Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper V
Helper V

DAX Formula for Drilling Down to the Min Value and maintain Level Hierarchy

I'd like to show a minimum value relationship per part.

The data I'm working with has a four level data hierachy per group.
Starting with the Group Name.

I need the min value down to the lowest hiercharchy per group pre exercise. 

The group is then exercised.
I need the min value down to the lowest hiercharchy per group post exercise.


I take the delta between pre and post exercise:  Delta = min(table[Pre Value]) - min(table[PostValue])

The problem arises is when I want to show this in a regular table.  I have to add the columns of each data level in the hierarchy to show the smallest and largest delta.  I don't want to show all the levels in the hierachy in the table. 

Basically show Group Name and Largest Delta and Smallest Delta.

I need a measure that will maintain the data hierachry down to the lowest level.

This is the only way I know how to get this to work.  Is to reveal each data level in the hiearchy.  (Drill Down)
This measure works fine with the table below, but shows way too much unwanted information.
Delta = min(table[Pre Value]) - min(table[PostValue])


Level1Level2Level3Level4Pre ValuePostValueDelta



What I need is a measure to condense and not show each level but maintain the hiearchy to the lowest level.
I do not know how to maintain or force hierchy level down to the lowest level using DAX.

This is what I need ideally with Min Delta and Max Delta as separate measures.
That way I can show both min or max Delta, or both.

DeviceLevel1Level2Level3Level4PreValuePostValueDelta TypeDelta

I would settle for the table below if it's any easier.

DeviceDelta MinDelta Max

PreValue is a measure.
PostValue is a measure

I've tried many DAX functions.  Using All, All Except, All Selected, Filter and some combination thereof as well as other functions.

I need help from the experts.

Thank You.

Community Support
Community Support

Hi @roncruiser ,


Is this what you want? Please check the attached .pbix file.


Filter Measure = 
    MINX ( ALLEXCEPT ( 'Table', 'Table'[Device] ), [Delta Measure] )
    MAXX ( ALLEXCEPT ( 'Table', 'Table'[Device] ), [Delta Measure] )
    IF ( [Delta Measure] = MIN_ || [Delta Measure] = MAX_, 1 )
Delta Max = 
    MAXX ( ALLEXCEPT ( 'Table', 'Table'[Device] ), [Delta Measure] )
Delta Min = 
    MINX ( ALLEXCEPT ( 'Table', 'Table'[Device] ), [Delta Measure] )



Best Regards,



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Icey 

I am looking at it now and trying to understand the logic behind your DAX measures and how it all works together.  The data I posted in this thread is a basic format example of the real data but not the real data.   The acutal data set is millions of rows deep.   I will apply your measures to the real data and I will respond soon.

Thank You for taking the time @Icey 

Helper V
Helper V

I would like like some help.  Anyone care to chime in to at least discuss will be appreciated.
I was thinking maybe a helper table to begin with?  Maybe a helper table is not needed.  I am unsure.
Hope to hear from the forum.  

Thank You.

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors