Hi team, I need help with SumOver Calculation in Quicksight. I am encountering an issue with a calculated column using `sumover(measure_value) [attribute 1, attribute 2, attribute 3]`.
Problem:-
When displaying totals, the results are incorrect. The `measure_value` appears to be aggregating across the entire dataset rather than summing the individual attribute-level values.
Example:-
“Accy Adj Units Region sumover” column shows incorrect totals
“Accy Adj Units Region (using default setting)” uses the same measure but with aggregation set to “Sum” in the values panel (as highlighted in the screenshot) — this produces the “correct” totals
Help needed:-
I need to achieve the correct total calculation within a calculated field itself, rather than relying on the values panel settings, since I will be using this column in subsequent calculations.
Can anyone please assist with the proper formula or approach? Sharing the screenshot for reference ? Thank you in advance
Have you tried adding ‘PRE_AGG’ to the end of your formula? So your formula would be sumover(measure_value, [attribute 1, attribute 2, attribute 3], PRE_AGG).
This tells Quick Sight to apply the sum at the row level first, then partition your attributes before any visual-level aggregations. I would strongly recommend looking into these resources as they are very helpful in explaining Level-Aware Calculations and Table calculation functions. Here are the resources:
Just checking back in since we haven’t heard from you in a bit. I wanted to see if the guidance shared earlier helped resolve your question, or if you found a solution in the meantime.
If you still have any additional questions related to your initial post, feel free to share them. Otherwise, any update you’re able to provide within the next 3 business days would be helpful for the community.
Since I haven’t received any further updates from you, I’ll treat this inquiry as complete for now. If you have any additional questions, feel free to create a new post in the community and link this discussion for context.