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
webportal
Impactful Individual
Impactful Individual

How to calculate the minimum of a measure?

How to calculate the minimum of a measure?

 

I have this Field Parameter with meaures:

NetSales = SUM('Table'[SalesValue])

SalesQty = SUM('Table'[Quantity])

 

Table is like:

Customer ID | Quantity | SalesValue

 

I want the minimum value of Quantity and Sales value per customer id.

 

So, using the NetSales in a slicer (single selection), the following expression:

MinNetSales = MINX('Table', SELECTEDMEASURE())
 
Which is returning BLANK.
3 REPLIES 3
webportal
Impactful Individual
Impactful Individual

@katika555 

Thank you for your help.

But, how about when the user changes the slicer value from Net Sales to Sales Quantity?

What you mena under Slicer Values Change?
Screenshot 2022-11-11 162330.png

MinSalesQty = CALCULATE(MIn('Sales'[Quantity]), ALLEXCEPT(Sales,Sales[Customer ID]))

Same for Qnt 

katika555
Resolver I
Resolver I

@webportal 

MinNetSales = CALCULATE(MIN(Sales[SalesValue]),ALLEXCEPT(Sales,Sales[Customer ID]))

See attached file: 
https://drive.google.com/file/d/1C-ssh8zFbl2PkfUvRTiiP0R4jLjlGVEq/view?usp=share_link

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.