Hello, I’m encountering an issue with sorting a chart in AWS Quick Sight when using a custom calculated field. Here’s the breakdown of my situation:
Problem:
- I’ve created a calculated field to toggle between displaying the count of decisions and the sum of amounts based on a parameter called ${ToggleTrend}.
- The calculated field works as intended, accurately displaying the desired metrics.
Error:
- However, when I attempt to sort the chart by this calculated field, I encounter the following error message:
The Level Aware Calculation (LAC) aggregate expressions is not supported in this calculation at this moment. Please remove the LAC aggregation expression from metrics.
Calculated Field Formula:
ifelse(${ToggleTrend}='No of Decisions',
count(count({latest_Result}, [{decision_id}])), // Fetches the no of Decisions
sum(avg(coalesce(amount, 0), [{decision_id}])) // Fetches the amount
)
- Could someone please advise on how to resolve this issue? Is there a workaround or alternative approach to achieve the sorting functionality without encountering this error?
Any insights or guidance would be greatly appreciated. Thank you in advance!