cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Measures to extract Max and Min values from Columns and Rows displayed

I look at a lot of conditionally formatted 2D arrays of data.

 

From this 2D array of data, I would like to create a measure that will give me the min and max values taking into account any filters I have applied to the data.  Each cell is the sum of it's contents.

 

For example in the screen capture below, i would like to view the min and max of the 2D array of data below with a min measure and max measure:

 

Annotation 2020-04-25 115621.jpg 

I have a sample of the data above contained in the excel file with a couple measures that get me close!

https://drive.google.com/open?id=1o0hLwe7o9VJZBkWlzkPF4WDJgN7y7wWb

 

The measures get me single min and max from a designated vref row, but I would like to look at the whole array of values and get min and max of the displayed values.

 

I'm close but not close enough...

 

Thank you...

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper III
Helper III

Re: Measures to extract Max and Min values from Columns and Rows displayed

I finally figured it out:

 

To get the min or max value for the 2D array of values:

 

For the max value:

=MAXX (
FILTER (
VALUES ( raw_data[CDC (Coarse+Fine)] ),
raw_data[CDC (Coarse+Fine)]
),
CALCULATE ( SUM ( raw_data[Value] ) ))

 

For the min value:

=MINX (
FILTER (
VALUES ( raw_data[CDC (Coarse+Fine)] ),
raw_data[CDC (Coarse+Fine)]
),
CALCULATE ( SUM ( raw_data[Value] ) ))

 

 

 

View solution in original post

2 REPLIES 2
Highlighted

Re: Measures to extract Max and Min values from Columns and Rows displayed

How about just write the measures (min and max) and put them in a cell (either another pivot table or cube formula). Then use conditional formatting over your pivot table to highlight  the values 



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Highlighted
Helper III
Helper III

Re: Measures to extract Max and Min values from Columns and Rows displayed

I finally figured it out:

 

To get the min or max value for the 2D array of values:

 

For the max value:

=MAXX (
FILTER (
VALUES ( raw_data[CDC (Coarse+Fine)] ),
raw_data[CDC (Coarse+Fine)]
),
CALCULATE ( SUM ( raw_data[Value] ) ))

 

For the min value:

=MINX (
FILTER (
VALUES ( raw_data[CDC (Coarse+Fine)] ),
raw_data[CDC (Coarse+Fine)]
),
CALCULATE ( SUM ( raw_data[Value] ) ))

 

 

 

View solution in original post

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.