Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
sdealtrey
New Contributor

Dynamic Rolling Period Total vs. the Period a Year Earlier

Hi,

I am trying to compare sale's totals year over year for the rolling same months. For example, March & April of 2018 compared to March & April 2017, but also have this dynamically roll into the next month. I have the formula for the previous 2 months, but I don't a viable formula for other previous time period. 


This is what I have for the current year-

=Sum({<Date={"$(='>=' & Date(MonthStart(Max(Date), -2)) & '<' & Date(MonthStart(Max(Date))))"}>} LINE_EXT)

sum(LINE_EXT) is my sales total measure.

Any help is appreciated it,

Thanks