Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |