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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Bart_Breekveldt
Contributor III
Contributor III

Rolling weeks next year

Dear Community,

I want to see certain orders (Amount) for in total 52 weeks, of which three are ahead and one is the current week. For that I made this formula of the rolling weeks. 

=IF(Week([Datefield])>=Week(Date(Today()+28)),IF(WeekYear(Today())=WeekYear([Datefield]),'W-'&Num(Week([Datefield]),00)),IF(Week([Datefield])<Week(Date(Today()+28)),WeekYear(Today())+1&' W-'&Num(Week([Datefield]),00)))

However, W-01 in 2020 doesn't connect with the other data (Amount, Weeks) (and therefore doesn't sort on Max(Datefield)

Qlik Rolling Amount.PNG

How can I solve this?

Thanks in advance.

Labels (2)
1 Reply
andoryuu
Creator III
Creator III

I wrote the accepted solution to an extremely similar situation yesterday.  Have a look and let me know if you still need help adapting to your rolling week and sorting needs.