Forum Discussion
Anonymous
5 years agoNot applicable
SUM only distinct values
Hello,
My table follows this structure:
| CODE | DATE | QTD |
| AA | 12/12/2020 | 5 |
| AA | 12/12/2020 | 5 |
| AA | 26/12/2020 | 8 |
| BB | 28/12/2020 | 2 |
| BB | 31/12/2020 | 2 |
I would like to create a measure that makes the sum of distinct values of the QTD column. So for the example above, the sum should be equal to 15 (5+8+2). And if I filtered by CODE=AA in my dashboard, it should be equals to 13 (5+8).
Can someone help me?
Anonymous , Try a measure like
sumx(distinct(Table[QTD]), [QTD])
3 Replies
- amitchandakSuper User
Anonymous , Try a measure like
sumx(distinct(Table[QTD]), [QTD])
- maciek971New Member
Hi,
I have a similar issue but based on the example above I'd like to SUM content of column B only once per unique row examined by the content of A column. - NJ13Helper I
amitchandak how about if i want to sum distinct values for QTD based on their codes for the most recent date submitted?