The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
18 | |
14 |
User | Count |
---|---|
36 | |
34 | |
20 | |
19 | |
15 |