They're back! Alternate States in Qlik Sense

If you were using QlikView in the past, you would know what we are talking about, and you are probably over-excited. If you are new to Qlik Sense, then let us show you a whole new world...

Introduction to Alternate States in Qlik Sense

When you make selections in Qlik Sense, you are filtering down the data model with Qlik's associative query engine. These selections are displayed in the selection bar at the top of each sheet.
The collection of selections is called a State and what you see in the selection bar is the Default Selection State. For those of you who are familiar with Set Analysis, this is what the $ stands for when you write an advanced expression, which can typically also be omitted. It's referencing the default selection state.

Now, the Qlik Engine provides you with the opportunity to also make selections in alternate states which are kept and processed in parallel within the same app. This means you can leverage two (or more) selection states in the same app which you can reference within your Set Analysis expressions, e.g.:

  • Default Selection State: sum({$} Sales)
  • Alternate State: sum({State2} Sales)

So why does it matter?

Alternate States are a powerful way to conduct Comparative Analysis in Qlik Sense by selecting different values in the same field and comparing them against each other in the same chart.

Take the next line chart for example. We are showing Income for two selected Countries in the following Vizlib Line Chart, and you can easily see how they fare in comparison across a time period (also check out the nice trend lines which provide more context).

The right Vizlib Filter in grey is making selections in the default selection state, whereas the left Filter in blue, which is the same Country field, passes selections in the alternate state.

Alternate States are for example used in Qlik for doing Market Basket Analysis.

How to use Alternate States with Vizlib

Ease-of-use is one of our three design principles meaning that a user should easily be able to implement alternate states without much setting up. We spent a lot of time thinking about how we can best integrate it and decided to make it as simple as possible. Each* of our Vizlib extensions now has a cool addition in their property panel called the Alternate State Panel.

In there, you will have the ability to set the chart or visualisation to a specific state, but also to manage states by creating new ones or deleting old ones. The states are maintained on a global level from within the property panel of each extension, which means if you create a new state in the Vizlib Filter, the Vizlib Line Chart will see it as well.

Straightforward, no coding required, just easy as ABC.

Alternate State Icon

When visiting the official Qlik Help Page on Alternate States, there's a warning on their site on this feature:

Alternate States functionality is enabled by a QlikView developer and should be used with caution as it can cause great confusion with end-users as there is no automatic on-screen indication that objects or expressions are in, or reference, alternate states.

Good point, and this is the reason why Vizlib introduced the Alternate State Icon which can be activated on any chart to help indicate that this chart is using an alternate state.

This way you'll never get lost. Of course, if you don't like seeing it though, as with all our settings, you can just deactivate it.


We have been advised that there is a Qlik Bug when using Alternate States on the Qlik Sense Server which results in alternate states, once created, to disappear when the app is refreshed. To overcome this limitation, alternate states needs to be created using the Qlik Sense Desktop Client, and then upload the App to the Qlik Sense Server.

What's next?

We would like to hear from you! Let us know how you find this feature or if you have any additional suggestions on how we can implement it better. Send us an eMail to or submit your ideas directly via our feedback form.

Alternate States will become a standard module in all the future Vizlib extensions that we release. At the time, we are also planning to work on an amazing new Selection Bar which will see alternate state selections displayed next to each other at the top. All on the roadmap - stay tuned.

(Download Vizlib Library with Alternate States)

Recommended Reading

Alternate States have existed in QlikView long before Qlik Sense was released. There's an extensive collection of qualitative blog posts, explanations and use cases ideas on how you can now use AS in your Qlik Sense dashboards to add more value in your apps for your users. Check them out!

*VATO and Story Timeline do not have alternate states feature implemented.