Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Anyone can help me to calculate sum of rolling 3-month(Current month and previous 2 month) data in qlik sense.
Thanks,
Ram Krishna
See this document: Calculating rolling n-period totals, averages or other aggregations
Hi,
Try like this
Sum({<Year=, Quarter=, Month=, Week=, Date={‘>=$(=MonthStart(Max(Date), -2))<=$(=Date(Max(Date)))’}>} Sales )
Check below link for similar type of expressions for various scenarios.
Set Analysis for Rolling Periods
Regards,
jagan.
How to do in load script?
Hi,
Try like this,
LOAD
*,
If(DateFieldName >= MonthStart(Today(), -2), 1, 0) AS Flag
FROM DataSource;
Now in set analysis try like this using flag
=Sum({<Flag={1}>} Sales)
Hope this helps you.
Regards,
Jagan.
Hey, Do you have any QVW or QVX file that are using rolling sum, it will be great help if you can attach the same.