Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
msmichael
Contributor

selection is lost after a Copy State Contents event is triggered

Hi experts,

I have a simple data model with below fields:

data:
load * Inline
[
cob_date,country,value
'4/30/2019', 'US', 100
'5/31/2019', 'US', 120
'6/30/2019', 'US', 115
'4/30/2019', 'JP', 10
'5/31/2019', 'JP', 20
'6/30/2019', 'JP', 50
'4/30/2019', 'HK', 50
'5/31/2019', 'HK', 70
'6/30/2019', 'HK', 90

]

In my dashboard, I want to compare the values for the countries for different cob_date, so I create two pairs of cob_date list box and bar chart, and put them side by side. I assign each pair a separate alternate state - State1 and State2 accordingly. Below is the screen shot when I select 5/31/2019 in State1 and 4/30/2019 in State2:

state2.PNG

 

Now I want to add a country list, and this list should work for both states, meaning when I select a country, both bar chart should show data for this country only.

What I did is,

1. Add a Listbox of country field. the List Box is in <inherited> state.

2. Add a triggers in "Document Properties" on country field event. In this event, I copy the state to State1 and State2.

The issue is, whenever I make a selection in the country list, the two cob_date listboxes will be reset to all. So any prior selections I made in the cob_date boxed will be lost after I click in the country list box..

So my question is how to make it work so the selections in each state will keep when a country is selected?

Pls find attached my dashboard. 

thanks,

Michael

1 Solution

Accepted Solutions
msmichael
Contributor

Re: selection is lost after a Copy State Contents event is triggered

Never mind. I solved the problem by using set analysis in the expressions.

 

View solution in original post

1 Reply
msmichael
Contributor

Re: selection is lost after a Copy State Contents event is triggered

Never mind. I solved the problem by using set analysis in the expressions.

 

View solution in original post