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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Ashley
Helper II
Helper II

Distinct Sum of Values

Hello,

 

This may be a basic question but I'm not quite sure how to achieve it. I have a table with a master category count column that has counts duplicated for each brand. Is there a way to do a distinct sum of only one of each value, so the highlighted values only? I can't remove duplicate values because I need each unique brand to remain present, but I don't want to quadruble my master number count. Each Master count represents a different total within a specific category, that's why you see the brands repeated in the brand column.

 

Ashley_0-1667509066547.png

 

Any help would be greatly appreciated.

 

Thank you!

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Ashley Well, if it is a column you could do this: 

Measure = SUMX(DISTINCT('Table'[MasterCategoryColumn]),[MasterCategoryColumn])

If it is a measure, This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Ashley Well, if it is a column you could do this: 

Measure = SUMX(DISTINCT('Table'[MasterCategoryColumn]),[MasterCategoryColumn])

If it is a measure, This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thank you for your response, it actually worked perfectly using SUMX(DISTINCT(.....

Ashley
Helper II
Helper II

Nvm, I think I figured it out!

 

using SUMX(DISTINCT(.....

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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