Forum Discussion
Measure - Sum distinct values another column ID
- 4 years ago
Hi, Anonymous
There are too many duplicate data in your table.
It is recommended to select columns ("Amount Billed", "Sales Tax", "Enviromental Charge") and then delete the duplicate values in "Transform Data",
You can sum distinct values values based on the columns in the new table.
You can also try formula as below:
Total Amount Billed = var tab=SUMMARIZE('Table','Table'[ID],'Table'[Amount Billed],'Table'[Sales Tax],'Table'[environment charge]) return SUMX(tab,'Table'[Amount Billed])Total Sales Tax = var tab=SUMMARIZE('Table','Table'[ID],'Table'[Amount Billed],'Table'[Sales Tax],'Table'[environment charge]) return SUMX(tab,'Table'[Sales Tax])Please check my sample file for more details.
Best Regards,
Community Support Team _ Eason
This does look like the data has been duplicated multiple times. You might want to investigate that. But if the data is as expected you could sum the distinct values using a measure like this.
Distinct Amount Billed =
VAR _DistinctAmountBilled = VALUES('Table'[Amount Billed])
return SUMX(_DistinctAmountBilled,'Table'[Amount Billed])See:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!