Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Calculating a sum and removing duplicate values

I am trying to use a measure to calculate the sum of good parts for each item number in this list of production scrap data. The problem is that an item can have multiple reasons for scrap in a day and the system repeats the number of good parts for each reason.


Scrap Data Example 020520.png

Can I get the measure to use the average or max value of good parts for each item per day in the sum?



Super User
Super User

You can use concatenatex, min and max


Concat reason measure = concatenatex(table,table[reason])


Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!
Solution Sage
Solution Sage

Hey @ruliana 


You just need to embed a DISTINCT function ( in each of your MAX, AVERAGE, and SUM measures.

Hey @Tad17 


Thanks for the reply, so would the best way to go about this be to get the max value for each day in one measure then, then sum that.

=MAX(DISTINCT([Good Parts])) .

I assume I would nest that in a CALCULATE() function but what filter would make sure it looks at each day individually?

Helpful resources

Power BI Show Ep 4 Post Show Carousel.jpg

The Power BI Community Show

Shabnam Watson demos Incremental refresh & Hybrid Tables and Leila Etaati demos Charticulator.

PBI April Release 2022 768x460.png

Check it out!

Click here to read more about the April 2022 updates!

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!