Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Alternate States - Problem

Hi Folks

I have a simple requirement relating to alternate states but it's not working.

I have a document with states: Primary and Secondary.

I have a line chart, the chart has 2 expressions:

Sum({Primary} Sales)

Sum({Secondary} Sales)

So, it should map trends of sales data over the two states, simple really.

However, the chart that is produced simply maps the Primary state for both expressions, it doesn't take any notice of the second expression being linked to the secondary state.  I would have thought this would be a fundamental requirement of alternate states so I can't believe its not supported, which means that I must have something wrong in my config.

The chart is set up with a state of Inherited but I've tried setting the chart to Inherited, Default, Primary & Secondary and none of them produce the chart I want, which is to compare the trend of Primary vs Secondary.

Anybody got any ideas on what I'm doing wrong?

Nigel.

3 Replies
Not applicable
Author

Hi Nigel,

can't guess in which way your chart isn't working. May be it's only a little detail in your config.

Please find attached a simple example which is working fine. One chart with two expressions and two related listboxes "Prim" and Second".

Hope this will help you to find a way out of your trap.

Roalnd

Not applicable
Author

Can you paste your sheet?

Not applicable
Author

Hi Roland

This helped, thanks.

I think the problem was that I was mixing some expression outside of the primary & secondary states, so my actual expression was something like:

Sum( {Primary <DateNum={">=$(vStartDate)<=$(vEndDate)"}>} Sales )

It would appear that adding in the startdate/enddate comparison removes the association with Primary or Secondary states, so I'm guessing that I need to change this so that it does something like:

Sum( {Primary <DateNum={">=$(vPrimaryStartDate)<=$(vPrimaryEndDate)"}>} Sales )

Thanks for your help, much appreciated.