Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
NickBentley82
Contributor II
Contributor II

Button to Select Last 4 weeks of Sales

I am trying to create a button to select the last four weeks of sales, rather than selecting each week individually from the list box. 

 

I am currently using the variable dMaxFYWeek to get my current financial week, but I am having trouble getting this week plus the previous 3 selected in the list box with the button. 

Thanks in advance!

Cheers, 

Nick 

1 Solution

Accepted Solutions
MayilVahanan

Hi @NickBentley82 

Try like below

MayilVahanan_0-1619406162680.png

 

='>='&WeekStart(Max(Date),-3)&'<='&WeekEnd(Max(Date),0)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

Hi @NickBentley82 

Try like below

MayilVahanan_0-1619406162680.png

 

='>='&WeekStart(Max(Date),-3)&'<='&WeekEnd(Max(Date),0)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
NickBentley82
Contributor II
Contributor II
Author

Thank you

Mayil Vahanan R.

Works Well!