Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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]
Write like below
If(left(lower([User ID]), 3) <> 'ed_t' or left(lower([User ID]), 3) <> 'D_ET' , 1) as [Exclude User ID]
one comment about lower and 'D_ET': that won't work together:
if lower is necessary, use 'd_et'
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.
Hi,
Try like this
if(mixmatch([User ID], 'ed_t', 'D_ET'), 1 ) AS [Exclude User ID]
Hope this helps you.
Regards,
Jagan.