Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create context filters?

I have 2 filters Continent and Country.

My data is like this:

Continent          Country

Asia                    China

Asia                    Japan

Asia                    Malaysia

Europe               Germany

Europe               Netherlands    

I am creating filters as list boxes but when i apply first filter of Continent, I want country filter to only give option of the countries which are in that particular continent, eg: If Asia is selected then Country filter should not have option of Germany and Netherlands.

19 Replies
ziadm
Specialist
Specialist

if these two field in the same table  or related table by a Country as key then selecting Continent will filter only countries in in the selected continent.  This is the associative experience of Qlik.  

Not applicable
Author

Hello Ziad,

Thank you so much for your reply. The problem I am facing is that both the filters are in different states. So, they are not filtering that way.

ziadm
Specialist
Specialist

Are you using Alternate State ?

Please pass a sample Data ...

marcus_sommer
MVP & Luminary
MVP & Luminary

There is an option within the listbox properties in tab general to hide excluded values. Another possibility would be to use a listbox-expression like: aggr(only(Country),Country).

- Marcus

Not applicable
Author

Hello Marcus,

Thank you so much for your reply? Does a search object also have same property to hide excluded values?

marcus_sommer
MVP & Luminary
MVP & Luminary

Yes, it have - within the tab presentation the first option.

- Marcus

Not applicable
Author

Hello Marcus,

It does not work when both the filters are in different alternate state.

marcus_sommer
MVP & Luminary
MVP & Luminary

I'm not sure if you could connect a search-box within different states with this excluding option but by a listbox-expression like above mentioned you could add a set analysis to the only() function which synchonized the states whereby I couldn't give you the right syntax for it because I don't use this feature and aren't familar enough to it. But I think if you searched for set analysis and alternate sates you will find various hints and examples.

- Marcus

Anil_Babu_Samineni

May be this for your list box expression


Aggr(Country, Country) should work

Capture.PNGCapture.PNG

marcus_sommer‌ -- Can i know why do we require Only() function here

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)