Forum Discussion

StuartSmith's avatar
StuartSmith
Icon for Power Participant rankPower Participant
5 years ago
Solved

Rolling 12 month Total

I currently have the below that displays a SUM of all invoices.  This worked great whilst we only had 1 years (12 months) worth of data, but now we have moved into 2021, we now have this years and la...
  • amitchandak's avatar
    5 years ago

    StuartSmith , Check these examples with date table. In one case date from the table has been used. Another one used date from date table.

     

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

     

     

    when you select one date and need a trend for 12 months

    https://www.youtube.com/watch?v=duMSovyosXE
    Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))