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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, I am struggling to achieve result below. I've already tried several functions with no result. The idea is to get in each row for a particular group, name of the person who got the max value.
| Group | Name | Country | Value | *Top Name |
| A | Jon | DE | 1 | Judy |
| A | Chris | GB | 2 | Judy |
| A | Judy | FR | 3 | Judy |
| B | Adam | IT | 10 | Barbara |
| B | Mike | PL | 20 | Barbara |
| B | Barbara | CZ | 30 | Barbara |
Solved! Go to Solution.
Hi @Anonymous
try new measure
Measure = LOOKUPVALUE(
Table1[Name];
Table1[Value];CALCULATE(max(Table1[Value]);ALLEXCEPT(Table1;Table1[Group]));
Table1[Group];selectedvalue(Table1[Group])
)do not hesitate to give a kudo to useful posts and mark solutions as solution
Linkedin
Hi @Anonymous
try new measure
Measure = LOOKUPVALUE(
Table1[Name];
Table1[Value];CALCULATE(max(Table1[Value]);ALLEXCEPT(Table1;Table1[Group]));
Table1[Group];selectedvalue(Table1[Group])
)do not hesitate to give a kudo to useful posts and mark solutions as solution
Linkedin
Awesome, thank you a lot, it works perfectly. If it's not a big problem, could you share more insights how the CALCULATE works with the SELECTEDVALUE inside a LOOKUPVALUE? I know each one of them, but the combination is what gives me trouble.
Thanks again 🙂
@Anonymous
well, lets try. we create a measure that will have a value in each row.
so, selectedvalue - is a value of selected field in each given row.
in tis solution for each row we:
first, looking for a max value for group
CALCULATE(max(Table1[Value]);ALLEXCEPT(Table1;Table1[Group]));
then make a lookupvalue this MAX value in the same table
and at last we check if this MAX value is about Group in the row (because, it could be a several different groups with the same MAX value)
do not hesitate to give a kudo to useful posts and mark solutions as solution
Linkedin
Thank you once again, I really apreciate your help!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!