pan325
pan325

Reputation: 33

Quicksight SUM of calculated field

I have the below calculated field in Quicksight that finds the max order amount per expense ID and produces the below table. I want to create another calculated field to put in a KPI that will count the sum of the order_amount

order_amount = max({Order Amount},[{Expense ID}])

enter image description here

I try to use this to find the sum : sum({Order Amount}, [{At ID}, {Expense ID}]) but it doesnt work.

Also this: sum(max({Order Amount}, [{At ID}])) gives me the below error. Visual agg functions can't be used operands of as Level Aware Calculation (LAC) agg functions

How to achieve this?

Upvotes: 0

Views: 48

Answers (1)

samhita
samhita

Reputation: 3505

You can try to use sumOver()

  • Create a new calculated field (eg Sum of Max Order Amounts).

  • Use below formula to sum the maximum values

    sumOver({order_amount}, [{At ID}])

Upvotes: 0

Related Questions