Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
66 | |
65 | |
57 | |
39 | |
28 |
User | Count |
---|---|
85 | |
60 | |
45 | |
42 | |
39 |