Forum Discussion
Anonymous
3 years agoNot applicable
Show highest values for each category
Hi, let's say I have the following data: Category Team Value A 1 5 B 2 10 C 3 15 D 1 20 A 2 5 B 3 0 C 1 15 D 2 10 For each team I want to show the ...
pratyashasamal
Memorable Member
3 years agoAnonymous , You can try this as well :-
MaxTest = MAXX(VALUES('DimensionTableName'[Category]),MAX([Values]))
Thanks,
Pratyasha samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
Thanks,
Pratyasha samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
Anonymous
3 years agoNot applicable
pratyashasamal If I use this one, I get for every category the highest value of sum. That is not what I want. I need for each team only 1 category, not all of them with the highest values. How can I do that?
- pratyashasamal3 years ago
Memorable Member
Try TOPN function once
- Anonymous3 years agoNot applicable
On the measure? That's not possible in Power BI. Or I can use TOPN for category or team but that does not seem to work.
- Anonymous3 years agoNot applicable
Hi Anonymous ,
According to your statement, I think in Team2, B and D should both be the category with highest value.
Measure:
Category with highest value in each Team = VAR _Step1 = FILTER ( ADDCOLUMNS ( 'Table', "Sum each Category", CALCULATE ( MAX ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Team] ) ) ), [Value] = [Sum each Category] ) RETURN CONCATENATEX ( _Step1, [Category], "," )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.