Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Calculate average using month instead total count

Hi ,  I am trying to  get  Month differnce values  based total value average . when  i created average dax measure  after that applied in table . getting error.   i have attached sample PBI file  ...
  • v-xiaotang's avatar
    4 years ago

    Hi Anonymous 

    Try this,

    DAX code:

    test1 = 
        var _totalEachYear= CALCULATE( SUM(Sheet1[Actuals]),ALLEXCEPT(Sheet1,Sheet1[Year]))
    return 
        IF(SUM(Sheet1[Actuals])>0,DIVIDE(_totalEachYear,12))

    Best Regards,

    Community Support Team _Tang

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