Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

How to create a filter based on 2 dimensions

Hi,

I would like to filter my data and display them by creating a filter based on 2 dimensions. Let's say I have a data set with 2 fields, Status1 and Status2. I would want to show any data that has "Urgent " in either Status1 or Status2, how do i do that? Status1 has 6 entires with urgent while Status2 has 7 entries with urgent. There are a total of 5 overlapping ones (meaning both Status1 and Status2 are urgent). Therefore the total number of urgent cases should be shown as 8, but right now, I can only make it display 6 or 7 depending on which Status I use as the dimension.

1 Solution

Accepted Solutions

Re: How to create a filter based on 2 dimensions

I'm afraid the technique in the blog post I referred to doesn't work in Qlik Sense yet. You're probably better off by creating a flag field in the script:

LOAD *, If( StatusField1 = 'Urgent' OR StatusField2 = 'Urgent', 'Yes', 'No') as IsUrgent

FROM ....

You can then simply use the IsUrgent field to filter on.


talk is cheap, supply exceeds demand
5 Replies

Re: How to create a filter based on 2 dimensions

Perhaps this blog post helps: Or-mode selections in QlikView The Qlik Fix!


talk is cheap, supply exceeds demand
Not applicable

Re: How to create a filter based on 2 dimensions

Hi Gysbert,

I could understand the logic behind it but not the script since I am still new to the syntax and stuff.

Are there other resources that you could point me to?

timanshu
Contributor III

Re: How to create a filter based on 2 dimensions

write this code after you fetch tables:

where status1='urgent' or status2='urgent'

Re: How to create a filter based on 2 dimensions

I'm afraid the technique in the blog post I referred to doesn't work in Qlik Sense yet. You're probably better off by creating a flag field in the script:

LOAD *, If( StatusField1 = 'Urgent' OR StatusField2 = 'Urgent', 'Yes', 'No') as IsUrgent

FROM ....

You can then simply use the IsUrgent field to filter on.


talk is cheap, supply exceeds demand
Not applicable

Re: How to create a filter based on 2 dimensions

Hi Gysbert,

Thanks for the help!

Regards,

Yun Zheng