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

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.

Reply
Anonymous
Not applicable

Max value of a category

Hello everyone!

 

I have the table like this where I need the max value per category. It is so then I can put everything in the same scale. I have the columns 'category' and 'value' butI need to get the column 'max':

 

categoryvaluemax
A58
A88
B44
C66
B44
A58
C16

 

Where 'max' is just the top value per category. I would like to have it as a column because I want to calculate the value of 'value'/'max' eventually.

 

Thanks!

 

Jon

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Ugarte335 , Create a new column

Maxx(filter(Table, [category] ?earlier([category])),[Value])

View solution in original post

3 REPLIES 3
pranit828
Community Champion
Community Champion

Hi @Anonymous 

 

A new measure will help in this situation

 

MAX_VAL = Calculate(MAX(Table[value],ALLEXCEPT(Table,Table[category]))

 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Regards,
Pranit





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
ryan_mayu
Super User
Super User

@Anonymous 

you can either use Amit's solution

Column = MAXX(FILTER('Table','Table'[category]=EARLIER('Table'[category])),'Table'[value])

or

Column 2 = CALCULATE(max('Table'[value]),ALLEXCEPT('Table','Table'[category]))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amitchandak
Super User
Super User

@Ugarte335 , Create a new column

Maxx(filter(Table, [category] ?earlier([category])),[Value])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.