Forum Discussion

pcray's avatar
pcray
Frequent Visitor
8 years ago
Solved

desktop - cumulative total

Hi Is someone able to point me in the right direction ive created a cumulative total for the last 12 months (rolling - see image) I would like to create a second column to show the previous 12 mon...
  • Phil_Seamark's avatar
    8 years ago

    Hi pcray

     

    This might be close

     

    Year L12Mths Prev = 
    CALCULATE(
        [Year L12Mths]
        ,SAMEPERIODLASTYEAR('Dates'[Date])
        )
  • v-jiascu-msft's avatar
    8 years ago

    Hi pcray,

     

    How about this one?

    New =
    CALCULATE (
        [total],
        DATESINPERIOD (
            dates[date],
            LASTDATE ( DATEADD ( 'dates'[Date], -12, MONTH ) ),
            -12,
            MONTH
        )
    )

     

    Best Regards,

    Dale