Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinDallas
Specialist III
Specialist III

Alternate States-Pass All $- Selections to Alternate State

Hello Folks,

I'm using Alternate States with QS August 2022.  Because I have charts that have combined measures, I find myself passing in the dimensions/years from the default state into my Set Analysis.

i.e

 

Sum({"State1"<Year=$::Year> + "State2"<Year$::Year> + $} Sales)

 

 

With each selection available to the user, the text between the brackets get longer and longer resulting in a monstrosity.

 

Sum({
"State1"<Year=$::Year,[Lactose Intolerance]=$::[Lactose Intolerance],[Horoscope]=$::[Horoscope]..> + 
"State2"<Year$::Year,[Lactose Intolerance]=$::[Lactose Intolerance],[Horoscope]=$::[Horoscope]..> + 
$} Sales)

 

 

Repeating each and every field that could be selected seems to have a code-smell and will lead to an insanely brittle dashboard. 

 

Is there a way to pass all the non-listed fields to the alternate states?

 

Any help is greatly appreciated.

Labels (3)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I typically address this kind of requirement using the set intersection operator "*". For example, "StateA" * $

See https://qlikviewcookbook.com/2016/07/alt-states-merged-selections-tip/ for more.

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

View solution in original post

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I typically address this kind of requirement using the set intersection operator "*". For example, "StateA" * $

See https://qlikviewcookbook.com/2016/07/alt-states-merged-selections-tip/ for more.

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com