Forum Discussion

sureddy1's avatar
sureddy1
New Member
9 years ago
Solved

dax group by measure

I have a table over which i need to calculate average of a column grouped by multiple columns. I am able to create a table using below:    GROUPBY(tableA,tableA[groupbyA],tableA[groupbyB],"AvgColum...
  • v-qiuyu-msft's avatar
    9 years ago

    Hi sureddy1,

     

    You can create a measure like below:

     

    Measure = CALCULATE(AVERAGE(Table1[Amount]),FILTER(ALLSELECTED('Table1'),'Table1'[Group]=MAX('Table1'[Group]) && 'Table1'[Year]=MAX('Table1'[Year])))

     

     

    You can download attached .pbix file to have a look.

     

    Best Regards,
    Qiuyun Yu