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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Displaying weeks in a listbox based on 2 other list box selections

I have 3 listboxes...

1) Year - displays data elements i.e. 2009, 2010, 2011, 2012

2) Prior Year - displays data elementsi.e. 2009, 2010, 2011, 2012

3) Weeks - displays data elements i.e. 201101 (week1), 201102 (week2),201103 (week3) etc. - the elements displayed depend on selections of Year and Prior Year listboxes above

The problem I am having is with the 3rd listbox for Weeks. I want to display all the weeks between Year and Prior Year selections.  For example, if I select '2011' in the Year listbox and '2010' in the Prior Year listbox.  I want to display all the weeks for 2011 and 2010 in the Weeks listbox.  However, if I choose '2012' in Year listbox and '2011' in Prior Year listbox, I want to display only the weeks that have passed for 2012 (since we are already in 2012) and all the weeks in '2011'.  Do I use set analysis?  Maybe there is another way of doing this without having all these listboxes but I am not sure.

5 Replies
Not applicable
Author

I would use a slider where one can define the range with the use of variables, and make sure the list box values are limited and within the variables.

Not applicable
Author

Thanks but I am not sure what you mean. Do you mean have a slider only for the weeks and listboxes for year and prior year?  My slider would be extremely big/long if I am displaying over 100 weeks.

I know for sure in the QV app there are seperate columns in a straight table where I need to use set analysis to calculate sum of sales for Year and another column to calculate sales for Prior Year so that is why I have two separate list boxes.  I hope this makes sense.

Not applicable
Author

I meant slider for the years..!! one slider for two of the year columns and the one list box for the week shows the values with in them.

Not applicable
Author

Ah ok.Sorry I've never used sliders before.  How would i distingish between Year and Prior Year in ONE slider when I am doing the set analysis calculation for each of the two columns?  FYI...the QV app is huge with lots of calculations in a lot of tables based on the time selections and 5 other filter selections so I don't want to have to go through every calculation and change the way the time selections are made unless i REALLY have to.  I appreciate all your help.

Not applicable
Author

Check the attachment and let me know if you