Forum Discussion

RaffiKouzoudj's avatar
RaffiKouzoudj
Helper III
5 years ago
Solved

Calculate Average per category

  Hello, I want to calculate the Average (mean) of the 2020 and 2021 based on the values on the above table. Example: (3792 + 3082 + 3337 + 3199) / 4   Any help! thank You  
  • Anonymous's avatar
    Anonymous
    5 years ago

    You don't show the model, so I can only give you a very general formula...

     

    [Measure] =
        AVERAGEX(
            DISTINCT( T[Month] ),
            [Your Base Measure]
        )
  • v-xulin-mstf's avatar
    5 years ago

    Hi RaffiKouzoudj

     

    Please try measure as:

    Measure = 
    CALCULATE(
        AVERAGEX(DISTINCT(Sub_main [Month]),Sub_main [Total]),
        ALL('Table')
    )

     

    Best Regards,
    Link

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.