Forum Discussion
how to find average
- Anonymous2 years ago
Hi amethyst_tang_2 ,
Try this DAX to create a measure:Measure = AVERAGEX( FILTER( ALL('Table'), 'Table'[Released_Year] >= 2010 && 'Table'[Released_Year] <= 2020 ), 'Table'[Gross] )And the final output is below:
Or you can build a slicer to filter the data from 2010 to 2020:
And now you can just use this DAX to calculate:
Measure 2 = AVERAGE('Table'[Gross])The output will change dynamically according to the slicer you select:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi amethyst_tang_2 ,
Here is my sample data:
I use this DAX to create a new measure:
Average Profit by Genre =
CALCULATE(
AVERAGE('Table'[profit]),
FILTER(
ALL('Table'[Year]),
'Table'[Year] > YEAR(NOW()) - 10
)
)
The final output is like below:
If your data table contains only the first 10 years of data, then the DAX only needs to be simplified to:
Average = AVERAGE('Table'[profit])
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.