Forum Discussion
AB1977
9 years agoRegular Visitor
Unique Sum DAX
Kia ora The picture below is a snippet of my data set. I want to be able to sum the second column based on the data in the first. I want to sum column 2 for each of the unique sets of dat...
- 9 years ago
Hi AB1977,
Assuming your dataset has a table named "Table1" which first column is named "Column1" and second column is named "Column2" ...
1.- Create a new measure called "Total Column2" with the following DAX code: SUM(Table1[Column2]).
2.- Create a new measure called "Total Column1" with the following DAX code: COUNTA(Table1[Column1]).
3.- Create a new measure called "Total" with the following DAX code: DIVIDE([Total Column2];[Total Column1]).4.- Create a new visual (table) with Column1 (ID) on rows and each of the measures you've created on columns
That should workVicente
v-jiascu-msft
8 years agoMicrosoft Employee
Hi AB1977,
Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.
Best Regards!
Dale