Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an issue where I want an expression to calculate for only the max value of another expression.
For example,
I have a sum of costs for each team, which group into departments. I want to show EBDIT for the department, but only on the team with the highest cost.
Department | Team | sum(cost) | sum(EBDIT) |
---|---|---|---|
IT | Helpdesk | 12399 | 40000 |
IT | BI | 2311 | - |
IT | ETL | 8790 | - |
Is it possible to do this?
if(sum(cost)=max(total aggr(sum(cost),Department,Team)),sum(EBDIT))
May be this:
If(Rank(Sum(cost)) = 1, Sum(EBDIT))
if(sum(cost)=max(total aggr(sum(cost),Department,Team)),sum(EBDIT))
This works, thank you so much Robin!
Didn't realize that there are two dimensions, but this should also work:
If(Rank(TOTAL Sum(cost)) = 1, Sum(EBDIT))
This works as well, thank you Sunny!