Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted

Re: Button Action to select 4 weeks

Can you try this

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

View solution in original post

4 Replies
Highlighted

Re: Button Action to select 4 weeks

May be

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

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)
Highlighted

Re: Button Action to select 4 weeks

Can you try this

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

View solution in original post

Highlighted
Creator II
Creator II

Re: Button Action to select 4 weeks

Hi,

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

Highlighted
Creator II
Creator II

Re: Button Action to select 4 weeks

Thanks Sunny.

It worked.

🙂 🙂