Forum Discussion
Remove duplicated rows in SUM calculation
- 8 years ago
OK, try this:
Measure = SUMX(SUMMARIZE(DistinctSum,[KEY],"Payment",AVERAGE(DistinctSum[PAYMENT])),[Payment])
Thanks Greg_Deckler.
I had thought along the same lines, but for some reason in trying this formula I get the "A table of multiple values was supplied where a single value was expected" error.
I think this is because when passing the DISTINCT there's no condition applied to provide a boolean value for FILTER to use.
As far as using Power Query to remove the duplicates, unfortunately, I need the other detail for other calculations. e.g. In this example show total paid to Plumbers.
Not sure, I recreated your table exactly, can you post your formula?
- johnf8 years agoHelper I
I think this is because when passing the DISTINCT there's no condition applied to provide a boolean value for FILTER to use.
- Greg_Deckler8 years agoCommunity Champion
OK, try this:
Measure = SUMX(SUMMARIZE(DistinctSum,[KEY],"Payment",AVERAGE(DistinctSum[PAYMENT])),[Payment])
- aschillinger206 years agoHelper II
Greg_Deckler This seems like a working answer for an issue i'm having except i dont see the option for "DistinctSum". My data structured like this:
Order Number | Hours
123544 | 2
123544 | 2
178113 | 1
199911 | 5
I would like to remove the duplicate 123544 from my sum to see 8 as the total instead of 10.