Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Anyone else having problems with alternate states

I am trying to use Alternate States to handle comparisons of two metrics.  I can get the expressions to work fine but I wanted to limit the list box values of one state based on certain values of the other state.  I am trying to use the column expression functionality in the list box.  Every time I try it,  it seems to just ignore the alternate state value in the set analysis for the .   Has anyone else been able to get that working?

Tags (2)
1 Solution

Accepted Solutions
jerem1234
Valued Contributor II

Re: Anyone else having problems with alternate states

Try:

=aggr(only({Current}Item), Item)

for the expression in the listbox

Hope this helps!

View solution in original post

6 Replies

Re: Anyone else having problems with alternate states

send us an example ...

Not applicable

Re: Anyone else having problems with alternate states

This is a small app the shows what I am trying to do.   The Benchmark Item list box is the one to focus on.  I am trying to get the list of items to adhere to the selection of Category for the alternate state of [Current], the list box called Current Category.   I have tried several variations of alternate state logic (not an expert yet by any means)  but can't seem to get it to work. I think it has something to do with having to use an aggregate function with set analysis.

I was, however, able to use if logic with a variable to get the values.   you will see it commented out in the expression editor.

thanks for any help.

Re: Anyone else having problems with alternate states

I've seen your example, but I do not understand why to use alternate states?

What is your objective?

Explain better.

Not applicable

Re: Anyone else having problems with alternate states

In the real example there are several other filter selections that should only be applied to either the Current or Benchmark alternate states (unlike category in my example posted).   An example is Organization structure.  Say I am looking at productivity numbers between a team (selected on current state side) and a group (selected on the benchmark state side).  I want the user to have that type of flexibility.

Regardless of whether this is the optimal solution or not for using alternate states and meeting my objective, I would like to know how you could do it this way

The main question here is how to you format your expression to show list box values based on selections from another state. 

jerem1234
Valued Contributor II

Re: Anyone else having problems with alternate states

Try:

=aggr(only({Current}Item), Item)

for the expression in the listbox

Hope this helps!

View solution in original post

Not applicable

Re: Anyone else having problems with alternate states

that was it.  thank you very much!!