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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Anonymous
Not applicable

A simple question, for a newbi user

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:

max value = MAXX(SUMMARIZE(Products, Products[Category_Name], "rev", SUM(Products[rev])), [rev])
and im now trying to get the category name of that measure, and i have no idea how to do it.
Un1111titled.png
   that is the value that i got, and and i want to see which category it is.
thanks!!! 🙂
1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

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)
)

 


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

View solution in original post

4 REPLIES 4
Stachu
Community Champion
Community Champion

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

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

Un1111titled.png

here is the example of the data i work with,

thanks

az38
Community Champion
Community Champion

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)
)

 


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

love u 

thanks!

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.