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
merep
Frequent Visitor

How can I get MAX or MIN value from a measure?

I am currently working with measures in a financial data structure in PowerBI, and I need to get the minimum value of a measure that's previously calculated to show in a graph.

 

The measure I need to get the minimum from is calculated from another measure that represents the accumulated costs of the various suppliers of a business. 

abc client.png

The image attached is the representation of the measure I need to get the minimum value of (ABC FILTER MAX A) and the name of the supplier. I tried to set a measure as 'MIN([ABC FILTER MAX A])' but it says I can only pass a column as an argument. Is there a way to do what I'm trying to do?

 

Thanks in advance!

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You need to break the measure down by supplier name. Try

Minimum value = MINX( VALUES( 'Table'[Account Description]), [ABC FILTER MAX A])

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

indeed, the result of measure is typically a single scalar value instead of a list of values. MIN expects to work on a list of value (a column). So in your case, suggest to add a calculated column in your table, than MIN that column.

 

There are other ways that can save the intermediate calculated column, like MINX. 

johnt75
Super User
Super User

You need to break the measure down by supplier name. Try

Minimum value = MINX( VALUES( 'Table'[Account Description]), [ABC FILTER MAX A])

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.

Top Solution Authors