Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have a simple two-column table, similar in layout to this:
Group | Total |
Red | 504 |
Green | 714 |
Yellow | 923 |
Blue | 258 |
White | 432 |
Black | 805 |
Orange | 601 |
Purple | 80 |
from which I need to find the maximum value of Total, and the Group to which it belongs.
I use the MAX function to find the maximum Total, but how can I get the Group associated with that maximum?
Solved! Go to Solution.
Hi @AndrewPF
Something like this? Is it possible you have more than 1 Group for the max Total?
test = CALCULATE(VALUES('Table'[Group]),'Table'[Total]=MAX('Table'[Total]))
Hi @AndrewPF
Something like this? Is it possible you have more than 1 Group for the max Total?
test = CALCULATE(VALUES('Table'[Group]),'Table'[Total]=MAX('Table'[Total]))
I used it, and it worked, thanks.
But then I tried it with MIN:
test = CALCULATE(VALUES('Table'[Group]),'Table'[Total]=MIN('Table'[Total]))
and it did not return the correct result.
There is no duplication between the numbers.
Any ideas?
Ignore last message.
It works with MIN too.
Thank you
User | Count |
---|---|
98 | |
76 | |
76 | |
48 | |
26 |