Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Synchronizing Selections between States

I understand that say when you have several list boxes to make selections from that you want to apply to all states, you need to add those to each states expression so it can use them.

The following is an example of what I have.

count({$<[Order Number] = p({$} [Order Number]) * p({[Group1]< [Territory] = $::[Territory], [Year Ordered] = $::[Year Ordered], [Month Ordered] = $::[Month Ordered]>} [Order Number])>} DISTINCT [Order Number])

my issue is that I need every state to see all possible selections. This would be time consuming to add every possible selection, so is it possible to tell it to pair to all selections except 1?

The 1 I want to exclude being the selection for each state. I have 3 list boxes with Class, each set to a different state. These of course I do not want to sync to the default state.

5 Replies
fernandotoledo
Partner - Specialist
Partner - Specialist

I couldn't get what you want to do. See if i got it right. You want to know on a list everything that was selected in all states but the default?

Not applicable
Author

count({State1<Year = $::Year, Month = $::Month>} DISTINCT [Invoice Number])

count({State2<Year = $::Year, Month = $::Month>} DISTINCT [Invoice Number])

The QliKView Developer will keep the Year and Month selections in State1 and State2 synchronized

with the Year and Month selections in the default state. The QlikView Developer can add

elements to the set modifiers as necessary in order to keep even more fields consistent between states.

That is the description from the Reference manual.

What I want is that if the user selects say Midwest from the territory selection box, then that selection should be applied to all 3 states in the chart.

Adding Territory= $::Territory to each expression does this. If Territory= $::Territory was not added, then only the default would change to only have Midwest, and all other states would show the total for all territories.

I have many of these selection boxes avaialble to the users, so I wanted to know if there is a way to synchronize all selections with all states instead of having to add each feild that I want to sync.

Edit: Note this is the full expression I am using. Would be rather messy if I had to add every possible selection from the main data.

='http://chart.apis.google.com/chart?cht=v&chs=330x220&'&

'chtt=Orders shared among products&' &

'chdl=' & 'Base' & '|' &

'x' & 'Group 1' & ' = ' &

count({$<[Order Number] = p({$} [Order Number]) * p({[Group1]< [Territory] = $::[Territory], [Year Ordered] = $::[Year Ordered], [Month Ordered] = $::[Month Ordered],Company = $::Company,[Customer ID]=$::[Customer ID]>} [Order Number])>} DISTINCT [Order Number]) &

'|x' & 'Group2' & ' = ' &

count({$<[Order Number] = p({$} [Order Number]) * p({[Group2]<[Territory] = $::[Territory], [Year Ordered] = $::[Year Ordered], [Month Ordered] = $::[Month Ordered],Company = $::Company,[Customer ID]=$::[Customer ID]>} [Order Number])>} DISTINCT [Order Number]) &  //' shared' &

'&' &

'&chco=FFCC00,9AB2CD,BDCBB3&'&

'chd=t:'&

round(count({$} DISTINCT [Order Number])/vMaxSetScale,1)&','&

round(count({[Group1]<[Territory] = $::[Territory], [Year Ordered] = $::[Year Ordered], [Month Ordered] = $::[Month Ordered],Company = $::Company,[Customer ID]=$::[Customer ID]>} DISTINCT [Order Number])/vMaxSetScale,1)&','&

round(count({[Group2]<[Territory] = $::[Territory], [Year Ordered] = $::[Year Ordered], [Month Ordered] = $::[Month Ordered],Company = $::Company,[Customer ID]=$::[Customer ID]>} DISTINCT [Order Number])/vMaxSetScale,1)&','&

round(count({$<[Order Number] = p({$} [Order Number]) * p({[Group1]<[Territory] = $::[Territory], [Year Ordered] = $::[Year Ordered], [Month Ordered] = $::[Month Ordered],Company = $::Company,[Customer ID]=$::[Customer ID]>} [Order Number])>} DISTINCT [Order Number])/vMaxSetScale,1)&','&

round(count({$<[Order Number] = p({$} [Order Number]) * p({[Group2]<[Territory] = $::[Territory], [Year Ordered] = $::[Year Ordered], [Month Ordered] = $::[Month Ordered],Company = $::Company,[Customer ID]=$::[Customer ID]>} [Order Number])>} DISTINCT [Order Number])/vMaxSetScale,1)&','&

round(count({[Group1]<[Order Number] = p({[Group1]<[Territory] = $::[Territory], [Year Ordered] = $::[Year Ordered], [Month Ordered] = $::[Month Ordered],Company = $::Company,[Customer ID]=$::[Customer ID]>} [Order Number]) * p({[Group2]<[Territory] = $::[Territory], [Year Ordered] = $::[Year Ordered], [Month Ordered] = $::[Month Ordered],Company = $::Company,[Customer ID]=$::[Customer ID]>} [Order Number])>} DISTINCT [Order Number] )/vMaxSetScale,1)&','&

round(count({$<[Order Number] = p({$} [Order Number]) * p({[Group1]<[Territory] = $::[Territory], [Year Ordered] = $::[Year Ordered], [Month Ordered] = $::[Month Ordered],Company = $::Company,[Customer ID]=$::[Customer ID]>} [Order Number]) * p({[Group2]<[Territory] = $::[Territory], [Year Ordered] = $::[Year Ordered], [Month Ordered] = $::[Month Ordered],Company = $::Company,[Customer ID]=$::[Customer ID]>} [Order Number])>} DISTINCT [Order Number])/vMaxSetScale,1)

fernandotoledo
Partner - Specialist
Partner - Specialist

I think that is the only way by now, but you can use only the fields that users may make selections.

Though this state thing is new, they may have a short way to declare this kind of interactions.

Not applicable
Author

That is what I was afraid of. I guess I will just deal with the time and clutter of adding each.

Not applicable
Author

What I want is that if the user selects say Midwest from the territory selection box, then that selection should be applied to all 3 states in the chart.

I would use an 'on select' trigger for your territory field.

In that trigger, add an 'external action > select in field' for each of your 3 states

(there is a selector in the dialogue box for the state you want that selection applied to).

When someone selects something from your territory field in the default state, the trigger sets the same selection into each of the states you specified.