Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Jahnavi2408
Contributor II
Contributor II

Using condition

can we able to use multiple condition in a where clause?

for ex: we are having several countries. ( ind, aus, eng,pak)

i need to filter and show only ind and aus.

so, how we can write script using where condition. 

can anyone please share your ideas for my learning.

1 Solution

Accepted Solutions
Clement15
Partner - Creator III
Partner - Creator III

Hello, you can use something like this

 

Load *

from Field

where match(countries,'ind','aus')

 

If the Where clause concerns different fields, you can add an “and” then the following condition

View solution in original post

10 Replies
Clement15
Partner - Creator III
Partner - Creator III

Hello, you can use something like this

 

Load *

from Field

where match(countries,'ind','aus')

 

If the Where clause concerns different fields, you can add an “and” then the following condition

Jahnavi2408
Contributor II
Contributor II
Author

Thank you so much for the solution.

Jahnavi2408
Contributor II
Contributor II
Author

where match(countries,'ind','aus')

in this same condition, if i wanted to check for IND and different fiels like salary 200000. 

how can we use the condition using AND in the where clause.

 

Clement15
Partner - Creator III
Partner - Creator III

Like this ?

Load *

from Field

where countries ='ind'

and  salary = 200000

Jahnavi2408
Contributor II
Contributor II
Author

if i try to add the AND in the where condition, i cant able to see the data for both. for country as well as for salary. 

 

this is my condition, for this i cant able to see the data.

where match(City,'Chicago' and Latitude = 40.730599);

Clement15
Partner - Creator III
Partner - Creator III

You cannot use the and in the match

Jahnavi2408
Contributor II
Contributor II
Author

So, what is the way to check 2 rows in the single where condition.

row1- city

row2- latitude 

 

Clement15
Partner - Creator III
Partner - Creator III

The match is useful if you have several categories selected for your field, otherwise the = is enough.
Does this formula work?

where City='Chicago'

and Latitude = '40.730599'

Jahnavi2408
Contributor II
Contributor II
Author

Running successfully, but cant able to see the data in data manager.