Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Calculate sum from average by month

Hello,

I want to make a table reflecting sum of the average monthly sales, vs the current year average by month.

For example the table would be something like this:

 

My table has the following fields:

 

Date, Sale year ( ie 2020, 2021, 2022) , Daily Sales

2 Replies

  • Anonymous , depending on how many month and year you want

    example 12 month , 1 year

    Rolling 12 = calculate(AverageX(Values('Date'[MONTH Year]),CALCULATE(sum(Sales[Sales Amount]))),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

     

     

    example 60 months, 5 year

    Rolling 60  = calculate(AverageX(Values('Date'[MONTH Year]),CALCULATE(sum(Sales[Sales Amount]))),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-60,MONTH))

     

     

    Monthly

     

    sum(Sales[Sales Amount])

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks !