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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

MIN or MAX of a measure

Hello,

 

there were some difficulties with the last thread, so I figured it would be good to create a new one to get the answer I need.

 

I have a "Line a clustered column chart" as following:

 

GraphGraph

 

Anyways, I have a "Line a clustered column chart" with the line as a quite complex measure and x-axis as date. I have a slicer that affects the date.

I also have a table with part number and qty in stock.

Is there a way to get the max and min value for the line/measure based on the date-slicer? In the graph if nothing is selected, the line will be the sum of qty in stock within the date selection, but if I click on part number 123, I would only see that part number's qty in stock. Is it doable?

 

Part NumberQty in stock (now)Min in stock
1231000
23412070
3458080
567700

 

Thanks in advance. Might be a better way to do it, but I thought it was weird that you couldn't do MIN of a measure.

 

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can try to use the following measure to meet your requirement.

min measure = CALCULATE(MINX(DISTINCT('Table'[Part Number],'Table'[sum Qty]),ALLSELECTED('Table'))

You can replace the ‘Table’[sum Qty] with your measure and replace ‘Table’[Part Number] with your field used in x-axis

Then We can get the result like this,

 

22.png

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can try to use the following measure to meet your requirement.

min measure = CALCULATE(MINX(DISTINCT('Table'[Part Number],'Table'[sum Qty]),ALLSELECTED('Table'))

You can replace the ‘Table’[sum Qty] with your measure and replace ‘Table’[Part Number] with your field used in x-axis

Then We can get the result like this,

 

22.png

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

OMG I LOVE YOU!

 

Thanks so much!😍

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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