Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hey there,
i somehow with the help of the internet managed to get the maximum value of the sum by a category, followed by that scrpit:
Solved! Go to Solution.
Hi @Anonymous
Maybe not the best solution but should work
create a rank measure
RankMeasure = RANKX(ALL(Products[Category_Name]),CALCULATE(SUM(Products[rev])),,DESC)
then your desired
TopCategoryMeasure = calculate(
FIRSTNONBLANK(Products[Category_Name],1),
FILTER(ALL(Products[Category_Name]),[RankMeasure]=1)
)
Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).
Column1 | Column2 |
A | 1 |
B | 2.5 |
here is the example of the data i work with,
thanks
Hi @Anonymous
Maybe not the best solution but should work
create a rank measure
RankMeasure = RANKX(ALL(Products[Category_Name]),CALCULATE(SUM(Products[rev])),,DESC)
then your desired
TopCategoryMeasure = calculate(
FIRSTNONBLANK(Products[Category_Name],1),
FILTER(ALL(Products[Category_Name]),[RankMeasure]=1)
)
love u
thanks!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
5 | |
4 | |
3 | |
3 |
User | Count |
---|---|
23 | |
12 | |
11 | |
9 | |
8 |