Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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.

🙂 🙂