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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Sum of max distinct values

Howdy all, I am looking for some help in summing distinct parent max values while filtering to a specific family, can y'all offer some guidence.

 

Example, I am wanting to only sum a single Usage value for each parent while also keeping the filter to each family (single family in example)

 

ParentFamilyUsageDistinct Max Sum
ID0759042125
GR305904025
GR305904025
DL075904225
DL075904225
DL075904225
66685904225
66685904225
59045904025
72605904025



1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

You can use measure to achieve your goal.

Distinct Max Sum =

SUMX (

    SUMMARIZE (

        ALL ( 'Table' ),

        'Table'[Parent],

        "_max", CALCULATE (

            MAX ( 'Table'[Usage] ),

            FILTER (

                'Table',

                'Table'[Parent] = MAX ( 'Table'[Parent] )

                    && 'Table'[Family] = MAX ( 'Table'[Family] )

            )

        )

    ),

    [_max]

)

Result is as below:

1.png

You can download the pbix file from this link: Sum of max distinct values

 

Best Regards,

Rico Zhou

 

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

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file from your onedrive business.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi @Anonymous 

You can use measure to achieve your goal.

Distinct Max Sum =

SUMX (

    SUMMARIZE (

        ALL ( 'Table' ),

        'Table'[Parent],

        "_max", CALCULATE (

            MAX ( 'Table'[Usage] ),

            FILTER (

                'Table',

                'Table'[Parent] = MAX ( 'Table'[Parent] )

                    && 'Table'[Family] = MAX ( 'Table'[Family] )

            )

        )

    ),

    [_max]

)

Result is as below:

1.png

You can download the pbix file from this link: Sum of max distinct values

 

Best Regards,

Rico Zhou

 

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

amitchandak
Super User
Super User

@Anonymous , Try a new measure

sumx(summarize(Table, Table[Family],Table[Parent],Table[Usage]),[Usage])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks @amitchandak however this doesn't quite return the result as expected. If I use the measure in a single visual I get the output of 25, however I was hoping to return the value of 25 for each row in the dataset.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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