Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have used the SUMMARIZE DAX in a calculated column and the result is somthing like this (within the SUMMARIZE table):
Branch | Revenue |
2 | 33000 |
1 | 22500 |
3 | 12000 |
I want to retrieve the branch with the highest Revenue.
E.g. I want the calculated column to say 2 since it has the max revenue.
My DAX looks like this currently:
Solved! Go to Solution.
@danialsj , Assuming Revenue is a measure like Sum(table[Revenue])
Top 1 Branch Revenue Rank = CALCULATE([Revenue],TOPN(1,all(Table[Branch]),[Revenue],DESC),VALUES(Table[Branch]))
RETURN
MAXX(TOPN(1,SUMTABLE,[Revenue]),[Branch])
@danialsj , Assuming Revenue is a measure like Sum(table[Revenue])
Top 1 Branch Revenue Rank = CALCULATE([Revenue],TOPN(1,all(Table[Branch]),[Revenue],DESC),VALUES(Table[Branch]))
Thanks! I changed some things around the DAX you sent and it has worked.