Forum Discussion
jcastr02
5 years agoPost Prodigy
Summing 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])
v-jingzhang
5 years agoCommunity Support
Try Amit's codes and add up all of them into a measure like below, this should work.
Measure = 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])You can also try this measure:
Measure 2 = SUMX(SUMMARIZE('Table','Table'[ID],'Table'[Minor Total],'Table'[Major Total],'Table'[Critical Total]),'Table'[Minor Total]+'Table'[Major Total]+'Table'[Critical Total])
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.