Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mohan2391
Creator II
Creator II

Button Action to select 4 weeks

Hi,

I am using 'Button For Navigation' extension from Qlik Sense Bundle.

Button Action: I want latest 4 weeks should be selected by clicking on it

For that I have used 'Select a value in a Field' action and selected Week field(my Week field has data like W1, W2, W3 etc.,)

and to select latest 4 weeks i wrote the below expression and it is not working because I have 'W' in my week representation

='>' &(Week(Today())-4) & '<=' & Week(Today())

So, my question is how to select latest 4 weeks data where week field has data in the format W1('W' & Weeknumber)

 

Thanks in advance

BR
BMK

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Can you try this

='(' & Concat('W' & ValueLoop(Week(Today())-3, Week(Today())), '|') & ')'

View solution in original post

4 Replies
Anil_Babu_Samineni

May be

='>' &Max(Week-4) & '<=' & Max(Week)

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
sunny_talwar

Can you try this

='(' & Concat('W' & ValueLoop(Week(Today())-3, Week(Today())), '|') & ')'
mohan2391
Creator II
Creator II
Author

Hi,

Thanks. Somehow, it didn't work for me. It might be because of the presence of string (W) in week.

mohan2391
Creator II
Creator II
Author

Thanks Sunny.

It worked.

🙂 🙂