Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
brunolelli87
Creator II
Creator II

Comparing two selection - Alternate States?

Hello guys,

With the following I chart I can see the number of flights per airline per day.

brunolelli87_0-1618864378092.png

The dimensions are:

- DASI //Date format
- NCIA //Airlines name

The expressions is:

count({<DASI=>} DISTINCT KEYI)

//KEYI is my Key field

 

Now, I would like to create another chart with just two bars in order to compare those Dates or Periods selected on Group1 and Group2. So, I'm expecting something like this:

brunolelli87_1-1618864682965.png    brunolelli87_2-1618864710141.png

brunolelli87_3-1618865355639.png

I tried to use Alternate States with no success... how can I do that? Any ideas? 

Please, find attached a sample file, but once I'm using Qlikview Personal Edition I won't be able to open any file!

Thanks guys, 

 

3 Replies
QFabian
Specialist II
Specialist II

Hi @brunolelli87 , here a few steps to do what you want :

1.- Create the Alternate States

QFabian_0-1618875535447.png

2.- Create new list boxes for DASI and their alternate states:

QFabian_1-1618875608037.png

QFabian_2-1618875629634.png

3.- modify your expressions to consider the alternate state:

QFabian_3-1618875728384.png

QFabian_4-1618875738386.png

 

4.- Test :

QFabian_5-1618875916295.png

 

QFabian
brunolelli87
Creator II
Creator II
Author

Hello @QFabian, thanks for your kindly response.

I've already done eveything as you kindly mentioned above... but I could not create the stacked bar chart and, even worst, if the user select 2 days on Group1 and 2 days on Group2, he would ended up with 4 "items" as dimension, and I would like to have just two. 

As you can see on my example above, the user selected 7 days on Group1 and 7 days on Group2, and the expected result is 2 stacked bars (and not 14).

I believe I need the sum of counts, per airline, you know 😊

Can you help me doing that?

brunolelli87
Creator II
Creator II
Author

Any idea?