Forum Discussion

Seyi38's avatar
Seyi38
Regular Visitor
2 years ago
Solved

How to Calculate Monthly Average for KPI Visual Target

I am trying to make the Target of my KPI visual the average monthly amount. I used this measure "Monthly Amount AVG = CALCULATE ( DIVIDE(Ops[View Value],DISTINCTCOUNT(Date_Dim[MonthYear])), All(Date...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi samratpbi ,thanks for the quick reply, I'll add further.

    Hi Seyi38 ,

    The measure I've created don't appear to be null for the moment.

    The Table data is shown below:

    Please follow these steps:
    1. Use the following DAX expression to create a measure

    Monthly Average = 
    VAR _a = CALCULATE(COUNTROWS(SUMMARIZE('Table',[Year],[Month])),ALL('Table'))
    VAR _b = CALCULATE(SUM('Table'[Value]),ALL('Table'))
    RETURN DIVIDE(_b,_a)

    2.Final output

     

     

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