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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Multiple Boolean flags bar chart

Hi all,

Quite new to Qlik so bear with me if this is an easy one. I have data that looks like this:

Unique IDCustomerRegionAttribute 1Attribute 2Attribute 3Flag 1Flag 2Flag 3
1AEaabYNY
2AGcdeNNY
3BFcdbNNN
4CFcccYYN
5DGdfdNNN


The flags are created in the script editor using logical statements based on Attributes 1, 2 and 3 (it might be more attributes in my actual data set).

e.g. Flag 1 = Y if Attribute 1 = Attribute 2

       Flag 2 = Y if Attribute 2 = Attribute 3

       Flag 3 = Y if Attribute 2 < Attribute 3

I am able to create a stacked bar chart that counts the 'Y' (excluding the 'N') per Flag and per Region. However, what I would like achieve is the flag being as well as the region being reflected in the current data selection upon clicking on a given flag's count for a given region.

Hope this makes sense. Thanks for your help.

1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

Hi Camilie,

Is this what you are looking for ? (ref attached)

A:

CrossTable(Flag, Data, 6)

LOAD [Unique ID],

    Customer,

    Region,

    [Attribute 1],

    [Attribute 2],

    [Attribute 3],

    [Flag 1],

    [Flag 2],

    [Flag 3]

FROM

[https://community.qlik.com/thread/303789]

(html, codepage is 1252, embedded labels, table is @1);

Best Regards,
KC

View solution in original post

4 Replies
sunny_talwar

I am not entirely sure I understand, but I think you might need The Crosstable Load function to transform your data and then create your chart

jyothish8807
Master II
Master II

Hi Camilie,

Is this what you are looking for ? (ref attached)

A:

CrossTable(Flag, Data, 6)

LOAD [Unique ID],

    Customer,

    Region,

    [Attribute 1],

    [Attribute 2],

    [Attribute 3],

    [Flag 1],

    [Flag 2],

    [Flag 3]

FROM

[https://community.qlik.com/thread/303789]

(html, codepage is 1252, embedded labels, table is @1);

Best Regards,
KC
Anonymous
Not applicable
Author

Thank you! However, upon drilling into the data (e.g. clicking on the graph) it doesn't reflect the 'Y' of a given flag in the current selection.

jyothish8807
Master II
Master II

Hi Camille,

Yes, it will not be displayed in current selection box because we are hard coding the cart to always show only the 'Y' values.

One way could be to add "Data" also in the dimension. Then when you click twice on the bar, you can see Y also as selected.

Br,

KC

Best Regards,
KC