Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
FF6
Contributor
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
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)