Issue Sorting Chart with Custom Calculated Field in Quick

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!

Hi,

You need to create a new sorting field and used it for sorting.

Regards,
Naveed Ali

Hey Naveed, thank you for your response.

By creating a new sorting field do you mean an off-visual field? If yes, I did try that too and was getting the same error.

Thanks,
Deepak

Hi,

Is the created field has an incremental number ? if not you need a unique incremental number for all row.

Regars,
Naveed Ali

Hi @deepakjangir,
It’s been awhile since we last heard from you. Were you able to find a work around for your solution or are you still in need of additional assistance?

If we do not hear back within 3 business days, I’ll go ahead and mark the solution.

Thank you!

Hi @deepakjangir,
Since we haven’t heard back, I’ll go ahead and archive this topic. If you have any further questions, feel free to create a new topic in the community and link this discussion for any relevant information.

Thank you!