Alternate States were introduced in QlikView 11. This allows different objects to be in different selection states.
You can have, for example, 2 list boxes, both with the same field, and both with a different set of selections.
One of the things that this enables a whole new way of "bucket" analysis - allow a user to compare the values from one set of selections against any other set of selections that they may want to make. It is incredibly powerful.
Many examples that I have seen will have two or three list boxes in each state, side by side, and some chart or set of charts displaying the results. The reason that you might have only two or three list boxes is really a practical one - there is only so much space on the screen.
My own solution to this is to put the sets of list boxes into containers. You can then fit many more list boxes for your side-by-side comparison. However, what if you want to have more than two sets? If I want to have, say, 4 states that I want to compare then it becomes more difficult to display those and still leave space for the charts.
You can, of course, do some funky stuff with hiding and showing different sets based on a click of a button. This can be a little confusing so I want to suggest a simpler approach.
Along with the Alternate States came a couple of new Actions - Swap State Contents and Copy State Contents. So, my approach is to have only one set of selections, that are in either their own State or event the default state, and make my selections in these. I can then have a button to Copy State Contents from the list boxes to the State that I want them in.
The screen shot shows the Action setup to copy the state contents from the "Default" state (blank) to a state that I have setup called "Selection1".
I would have this action attached to a button called "Save Selection 1" (or something that will make sense to my users) and then have some charts that will show this versus Selection2, Selection3, etc.
To extend a model that uses Show/Hide boxes means having to do quite a bit of work. To extend this model means adding one new button.
Stephen Redmond is author of QlikView for Developer's Cookbook
He is CTO of CapricornVentis a
QlikView Elite Partner. We are always looking for the right people to join our team.
Follow me on Twitter: @stephencredmond