Forum Discussion
Unique Sum DAX
- 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
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 work
Vicente
- erik_tarnvik9 years ago
Solution Specialist
Or, since the function described is essentially an average, create a measure AverageC2 = AVERAGE(Table1[Column2]) and create a visual with Column 1 in the first column and this measure in the second.