Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Link two list boxes with same dimension

This sounds like a silly question but I have a real application.

For one of my dimensions I want to have a static list of options to chose from. Then I want another list box that has all the remaining possible selections.  This box is formatted differently (smaller font, etc) than the main listbox and would be used less frequently.  Technically one should be able to make several selections in both boxes if so desired.

Problem: Making a selection in one box wipes out the selection in the other box.

Not sure if there is a solution that includes me keeping both boxes but would really like it if there was.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

This was really close but it requires that both states have a selection.  I need it to accept either/or or both.  I suspect that is not possible given what i have learned.  Thank you everyone for providing all the great (and quick) feedback.  This site is very helpful.  Thanks again.

View solution in original post

17 Replies
ramoncova06
Specialist III
Specialist III

you can do this, though you would need to use alternate states

Is possible to use alternate States with set analysis

malini_qlikview
Creator II
Creator II

Hi,

This might be useful,

Alternate States

Description

You can use Alternate States to perform comparative analysis between sets of multiple data items, for example for basket analysis purposes. A state holds a set of selections.

The QlikView developer can create multiple states within a QlikView document and apply these states to specific objects within the document. The end-user can create copies of these objects (server objects) and then put those objects into different states.

The most important difference between Detach and Alternate States is that ALL objects in a given state will respond to user selections made in that state. Objects in a given state are not affected by user selections in the other states.

Alternate States functionality is not accessible in the load script.

Note!
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. It is up to the QlikView developer to provide this information to the end-user using the StateName() function.

Setting Alternate States

Do the following to enable and set alternate states:

  1. Click Alternate States... in the Document Properties: General tab.
    The Alternate States dialog opens.
  2. Click Add... to create a number of states, and name them. The names will be referred to as state identifiers.
  3. Click OK to close the dialog.

Now the QlikView developer can create new Alternate States from within screen objects.End-users who access QlikView documents from a QlikView Server can make use of Alternate States but cannot create Alternate States.

Assigning States to Objects

Do the following to assign a state to an object:

  1. Open the Properties dialog and select the General tab.
  2. Set Alternate State to the state identifier you want to use for the object.

The object will now be independent from the rest of the document in terms of selection, unless other objects are set to the same state.

There are two states that are always available; default state and inherited. The default state is the state where most QlikView usage occurs and is represented by $. The QlikView document is always in the default state. Objects can inherit states from higher level objects, such as sheets and containers. This means that states are inherited as such: Document - Sheet - Sheet Objects. The sheets and sheet objects are always in the inherited state unless overridden by the QlikView developer.

Comparing Alternate States

You can compare two states on the same object. For example, you can create a line chart to display both states of the data with the same axis by assigning a state in the expression using Set Analysis.

Example:

If you have defined the states Group1 and Group2, you can compare the average of field Adj.Close for the groups by showing these two expressions in a line chart:

Avg({[Group1]} [Adj.Close])

Avg({[Group2]} [Adj.Close])




Also you can refer the use case, http://livingqlikview.com/alternate-states-use-cases/

Anonymous
Not applicable
Author

Can you provide an example of how this might look?  Do I need two alternate states or just one.  I'm looking for two separate list boxes of the same dimension to feed a graph.

MarcoWedel

‌if you perform selections in a field there are per definition no "remaining possible selections".

regards

Marco

Anonymous
Not applicable
Author

Please see attached ->  "Product grouping tab"


Re: Alternate States example app

Anonymous
Not applicable
Author

'm using an expression in the list box.  I created a list box that references only specific fields within a dimension.  The other list box specifically references all the others.  I

List Box 1

=If(match(Scenario,vCurLBEScenario, vPrevLBEScenario, 'Actual', 'Plan', 'Standard'),Scenario)

List Box 2

=If(Not Match(Scenario,vCurLBEScenario, vPrevLBEScenario, 'Actual', 'Plan', 'Standard','CurLBE vs PrevLBE','Actual vs PrevLBE'),Scenario)

I want both list boxes to control a graph.

I think I need one alternate state and use that in List Box2.  Then reference that state in the graph.  Just not sure about the syntax.

Anonymous
Not applicable
Author

Hi Mark,

please apply states in expressions for graph like below:

sum({[State A]<[Region] = $::[Region]>} Sales)

sum({[State B]<[Region] = $::[Region]>} Sales)


Regards

Neetha

Anonymous
Not applicable
Author

Is there syntax that you could combine the expression into one telling the graph to use both states?

So in otherwords I want it to combine selections from both listbox 1 and listbox 2 into one big selection (as if I only had one list box).

Anonymous
Not applicable
Author

Hi Mark,

No it's not  possible to apply two different states for one Object.

For Achieving such kind of requirement , you  should create 2 objects with two different states

and apply these states to expressions in graphs then only it is possible.

Regards

Neetha