1 Reply Latest reply: Feb 6, 2013 11:23 AM by Anton Wibowo

# Alternate States Set Analysis

Hi All

I'm looking at using Alternate states and to that end I'm was going over the QV11 example doc.

The set analysis looks odd please can someone explain it to me?

e.g. sum({[Group 1]<Region = \$::Region, [Sales Rep] = \$::[Sales Rep], Path = \$::Path, Year = \$::Year, Quarter = \$::Quarter, Month = \$::Month>} Sales)

What does this do, I'm not familiar with the \$:: syntax?

Thanks

Dom

• ###### Re: Alternate States Set Analysis

Hi Dom,

It's been awhile, but hopefully I can share something useful. The new feature on QV11 is the Alternate States, which allows you to "group" certain objects into a specific "state" (for example, State A). Now, the basic concept is you can see the result of your charts changes by getting values from listboxes belong to a "specified" state, instead of from "default" state (I'm referring the <inherited> as default state).

In the example above, it seems your have "Region, Sales Rep, Path, Year, Quarter, Month" belong to "Group 1" state. Now, depending on your chart containing the expression, whether it belongs to "default" state or "Group 1" state.

a. If your chart belongs to the same state as those listboxes, expression "sum(Sales)" will give you results based on the selection made on that state. If you made selection on listboxes belong to "default" state, it won't change your charts' results

b. If your chart belongs to "default" state, expression "sum(Sales)" will not change based on the selection made on the listboxes of "Group 1" state. To make your chart dependent on the "Group 1" objects, you need to modify your expression to "sum({[Group 1]}Sales)"

c. If your chart belongs to "default" state, but you'd like feed your chart both using default state for "Region, Sales Rep, Path, Year, Quarter, Month", and using other listboxes from "Group 1", then, you use "\$::"  to  pull the values from default state of those fields. This means, when you made selection on "Region" belongs to "State A", the chart will no longer respond to it.

You can also check out this article: http://community.qlik.com/message/209392#209392. It helps me alot.

Cheers,

Anton