Showing results for 
Search instead for 
Did you mean: 
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

collabdays lisbon

CollabDays Lisbon - 26 November 2022

Sessions include practical, hands-on experience that will help you take the next step in your career and know-how.

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.