Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Mapping Value by max in a group

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.

 

GroupNameCountryValue*Top Name
AJonDE1Judy
AChrisGB2Judy
AJudyFR3Judy
BAdamIT10Barbara
BMikePL20Barbara
BBarbaraCZ30Barbara
1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

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


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

4 REPLIES 4
az38
Community Champion
Community Champion

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


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

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 🙂

az38
Community Champion
Community Champion

@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


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Thank you once again, I really apreciate your help!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors