Forum Discussion
RedDragon
5 years agoHelper I
Distinct count to get sum
hi there i have the below
id value
1 5
1 5
2 3
3 1
4 6
4 6
i need to create a card that shows the sum of the value field. Currently it is showing (5+5+3+1+6+6 = 26). I need it to take the distinct of id and give me the total which should be (5+3+1+6 = 15)
please help.
@RedDragon , Test as
sumx(values(Table[ID]), max(Table[Values]))
O
sumx(summarize(Table, [ID], [Value]),[Value])
3 Replies
- amitchandakSuper User
@RedDragon , Test as
sumx(values(Table[ID]), max(Table[Values]))
O
sumx(summarize(Table, [ID], [Value]),[Value])
- RedDragonHelper I
thank you so much. this one worked!😀
- Greg_DecklerCommunity Champion
RedDragon Try:
Measure = SUMX(DISTINCT('Table'),[Value])