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

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

If statement with multiple conditions?

I'm trying to develop an If statement that matches several conditions.  The reason I am trying to do this is to remove some data that isn't necessary.

We often have people testing inside our database.  They'll use a User ID like "ed_t" or "D_ET".  So I when I import my data, I don't want to include those in the dataset at all.

My If statement doesn't seem to work, though.  It only matches the first condition.  Any thoughts?

If(left(lower([User ID]), 3) <> 'ed_t' or 'D_ET', 1) as [Exclude User ID]

4 Replies
srinivasa1
Creator II
Creator II

Write like below

If(left(lower([User ID]), 3) <> 'ed_t'  or  left(lower([User ID]), 3) <> 'D_ET' , 1) as [Exclude User ID]

Not applicable
Author

one comment about lower and 'D_ET': that won't work together:

if lower is necessary, use 'd_et'

Not applicable
Author

If you're comparing the same field in each condition, you can use match, mixmatch, or wildmatch for case sensitive, case insensitive, and wild card matches.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

if(mixmatch([User ID], 'ed_t', 'D_ET'), 1 ) AS [Exclude User ID]

Hope this helps you.

Regards,

Jagan.