Forum Discussion
Anonymous
6 years agoNot applicable
Dax help!
Been trying to write a dax to find the Average of Value column grouped by Beverage type and Country.
I have tried these 3 approaches below
AvgConsumption = GROUPBY('Table','Table'[Beverage Type],"avg",AVERAGE('Table'[Value]))
AvgConsumption = GROUPBY('Table','Table'[Beverage Type],'Table'[Country],"Avg",AVERAGEX('Table','Table'[Value]))
AvgConsumption = CALCULATE(AVERAGE('Table'[Value]),GROUPBY('Table','Table'[Beverage Type],'Table'[Country]))
Hi Anonymous
you can create a measure with ALLEXCEPT()
AvgConsumption = CALCULATE(AVERAGE('Table'[Value]), ALLEXCEPT('Table', 'Table'[Beverage Type], 'Table'[Country]) )
1 Reply
- az38Community Champion
Hi Anonymous
you can create a measure with ALLEXCEPT()
AvgConsumption = CALCULATE(AVERAGE('Table'[Value]), ALLEXCEPT('Table', 'Table'[Beverage Type], 'Table'[Country]) )