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

Need help with finding the minimum value for a measure

I am trying to find the minimum value for my Measure 3 which is addition of two other measures. Measure 1 and 2. I am using this formula for the minimum value: MINX(Table,Measure3)

The data granularity of Measure 1 and Measure 2 is as shown in the image. Measure 1 is as of today and doesnt change wrt date. Measure 2 changes with date.

deep_pbi93_0-1596214745656.pngdeep_pbi93_1-1596214783587.png

Now when I add Measure 3 in the same row as category and product, it shows the correct value for measure 3 even after filtering for data range. When I am taking min of measure 3 however which belongs to a separate scorecard visual, the date filer applies even to the products and those products which are not a part of the filtered date range (courtesy of the product-product relationship between 2 tables), the min gets the minimum value for the filtered products. I want it to take minimum value of all products whether or not it is within the date range. I added all(Date) but this does not capture the change happening in Measure 2 due to date and that is incorrect too. Measure 2 will change with date. Measure 1 wont. I basically want the Minimum of all the products whether or not they are in the filtered date range.

2 REPLIES 2
Greg_Deckler
Super User
Super User

This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hello, 

 

Appreciate the help. However, this did not work for me. My issue is that the date slicer filters out some products. I want minimum value of those products too.

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.