O'Reilly logo

QlikView for Developers Cookbook by Stephen Redmond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using alternate states with Set Analysis

The alternate states function was introduced to QlikView in version 11. It allows us to create a named set of selections separate to the default current selections. At a simple level, this allows us to create a side-by-side analysis to allow us to easily and quickly compare one set of selections versus another. At a more complex level, it opens up a wide range of analysis possibilities.

In this recipe, we will create two states and look at how we access those states in the Set Analysis syntax.

Getting ready

Load the following script:

LOAD * INLINE [ Country, City, Year, Sales USA, San Francisco, 2011, 1245 USA, San Francisco, 2012, 3322 USA, San Francisco, 2013, 3245 USA, New York, 2011, 2765 USA, New York, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required