Forum Discussion
SUM DISTINCTCOUNT Does not work properly
I friends, I would like to see the trend of sales through customers, so, I made a DAX expression where I have a distinct count of the product, but, when the table automatically sum the distinct count, the numbers aren't correctly
Here the DAX:
Sum of Unique =
SUMX(VALUES(Consulta1[Producto]), CALCULATE(DISTINCTCOUNT(Consulta1[Cantidad]) )
)But where I checked the total sum, it isn't the correct number
This calculation is based through weeknds
So, what can I do for fix this situation?
thanks mates
2 Replies
- Greg_Deckler
Community Champion
Anonymous This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907- AnonymousNot applicable
yea, but you have a filter, you want to see the difference after the 1000 units per year, I have it splitted per name of the product, but, it didn't work yet, this is the DAX I used:
Sum of Unique = IF( HASONEFILTER(Consulta1[Product]), (SUMX(VALUES(Consulta1[Product]), CALCULATE(DISTINCTCOUNT(Consulta1[Amount])) )))