Forum Discussion
Dominok123
7 years agoFrequent Visitor
Finding Average, Sum and CountDistinct after Grouping
Hey guys, super basic question but what would the DAX expression be for finding the average, sum and countdistinct of one column after being grouped by another column. Example for average: Colum...
- Anonymous7 years ago
Try to use this measure definition
AvgSales = CALCULATE(AVERAGE(Table1[Sales]),ALLEXCEPT(Table1,Table1[Group]))Regards
Greg_Deckler
Community Champion
7 years agoThe easiest way would be to put Column1 in a Table visualization. Then add Column2. In the Values area of the VISUALIZATIONS pane, use the little drop down arrow next to Column 2 to change the aggregation to average, etc.