Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
FF6
Contributor

Difference between the values of two months in rolling window.

I have to create a line chart with the measure of difference between the values of two months in rolling window with 12 month gap. Basically:

For Aug-23, I have to take a difference between value of Aug-23 and Sep-22

For Sep-23, difference between value of Oct-22 and Sep-23 and likewise.

 

Labels (4)
1 Reply
Chanty4u
MVP

Try this 

SUM({<MonthYear = {"=$(=Date(AddMonths(Max(MonthStart(MonthYear)), 0), 'MMM-YY'))"}>} Sales) 

SUM({<MonthYear = {"=$(=Date(AddMonths(Max(MonthStart(MonthYear)), -12), 'MMM-YY'))"}>} Sales)