Forum Discussion
jcastr02
Post Prodigy
5 years agoSumming with distinct values
how can i get a sum of all values of three columns (minor, major, critical) but only distinct values based on the ID column. My data has repeating rows and I can't remove because I'm using other fie...
- 5 years ago
jcastr02 , Create measure like this for all three columns
sumx(summarize(Table,Table[ID], Table[Minor Total]),[Minor Total])
sumx(summarize(Table,Table[ID], Table[Major Total]),[Major Total])
sumx(summarize(Table,Table[ID], Table[Critical Total]),[Critical Total])
mhossain
Solution Sage
5 years ago
In adition to amitchandak 's dax, you can also try below measure:
DistinctCount based on 3 cols =
CALCULATE(DISTINCTCOUNT('Table'[ID]) , 'Table'[Minor Total]>0)
+
CALCULATE(DISTINCTCOUNT('Table'[ID]) , 'Table'[Major Total]>0)
+
CALCULATE(DISTINCTCOUNT('Table'[ID]) , 'Table'[Critical Total]>0)