Search code examples
amazon-quicksight

How to create visualization using ratio of fields


I have a data set similar to the table below (simplified for brevity)

enter image description here

I need to calculate the total spend per conversion per team for every month, with ability to plot this as time based line chart being an additional nicety. The total spend is equal to the sum of Phone Expenditure, Travel allowance & Misc. Allowance, this can be a calculated field.

I cannot add a calculated field for the ratio, as for some sales person, the number of conversion can be 0 for a given month. So, averaging over team is not option. How can I go about this?

Thanks for help and suggestions in advance!


Solution

  • I've discussed the question with the Harish offline. I've learned that he is trying to calculate ratio per group, not per row. To perform calculations per group, users can add calculated fields inside a QuickSight analysis and use level aware aggregation expressions. (Note that level aware aggregations can only be used in an analysis, not in the data prep view). Here is a link to the documentation about level aware aggregations if you want to learn more about this area https://docs.aws.amazon.com/quicksight/latest/user/level-aware-aggregations.html