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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors