Forum Discussion

amethyst_tang_2's avatar
amethyst_tang_2
Frequent Visitor
2 years ago
Solved

how to find average

hi i would like to find out the average profit of each genre for the past 10 years . 

i have done power BI features like :
using calculate, sum and filter to found out about the sum of gross that year.

i am now looking for ways to find the average of this, how can i do that?

  • Anonymous's avatar
    Anonymous
    2 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.

5 Replies