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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
walkery
Helper I
Helper I

Sum column based on unique IDs

Hi: I have a dataset with 50K records in it. Some of those records have duplicate IDs, leaving only 47K unique values, they just have a different employee attached to them thus resulting in a duplicate ID. I'd like to create a card on my dashboard that shows the total revenue, while not double counting the duplicate records. Example table below. With this example the card would ideally display 14,500, only summing the revenue column for the first instance of a Deal ID. I thought it should be simple but I've tried other solutions posted on this forum with no luck. Thanks. 

 

Deal ID           Revenue     Employee
12345             1,000          Jon Smith
12345             1,000          Bill Jones 
12346            12,000          Jon Smith
12555             1,500           Jane Doe 
12555             1,500           Michael Scott
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

You probably want to do something like:

 

Measure = SUMX(SUMMARIZE(Table,[Deal ID],"__Revenue",AVERAGE([Revenue])),[__Revenue])


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

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

You probably want to do something like:

 

Measure = SUMX(SUMMARIZE(Table,[Deal ID],"__Revenue",AVERAGE([Revenue])),[__Revenue])


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...

Thanks! 

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.