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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Shiva123
Creator
Creator

Rolling 52 weeks

hello,

          every one i have a typical scenario where in i have to create a variable for rolling 52 weeks (exactly a year ago ) using another  variable (which changes every week) so that i could limit my data for Rolling 52 weeks. First of all is this  the right way of liming data by using variable?  or is there any procedure, if so could you please let me know .

Thanks in advance

Labels (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

If you need exact 1 year back comparison you can use this?

Sum({<Year = {">=$(=AddYears(Max(Year), -1)) <=$(=Max(Year))"}>} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Anil_Babu_Samineni

If you need exact 1 year back comparison you can use this?

Sum({<Year = {">=$(=AddYears(Max(Year), -1)) <=$(=Max(Year))"}>} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
rohitraut
Creator
Creator

Hello Shiva,

Try this,

Rolling 52 Weeks:

=count({<Week={"<=$(=Week(max(Date)))  >= $(=Week(max(Date))-52)"}>}Date)

Hope this helps!

mostwanted123
Creator
Creator

Hi Shiva,

For Rolling 52 weeks,

Sum({<Date={">=$(=Week(max(Date))-52)<=$(=Week(max(Date)))"}>}Sales)

Regards,

Pratik Bhor