Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Gysbert_Wassenaar

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

View solution in original post

5 Replies
Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand
Not applicable
Author

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
Creator III
Creator III

write this code after you fetch tables:

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

Gysbert_Wassenaar

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
Author

Hi Gysbert,

Thanks for the help!

Regards,

Yun Zheng