Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Average by Category

Hi,    I am trying to calculate the average by categroy however, my numbers are not adding up.    AVERAGE =       
  • v-henryk-mstf's avatar
    4 years ago

    Hi Anonymous ,

     

    Try formula like below:

    M_ =
    VAR count_category =
        COUNTROWS ( ALLEXCEPT ( 'Table', 'Table'[Category] ) )
    VAR sum_ =
        CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ) )
    RETURN
        DIVIDE ( sum_, count_category, BLANK () )

    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


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