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.
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!
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 |
---|---|
43 | |
21 | |
20 | |
15 | |
13 |
User | Count |
---|---|
45 | |
41 | |
39 | |
19 | |
19 |