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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

creating an exception in a statement

Hi all,

I'm stuck on this problem.. I'd like to create an exception within my script. eg. (something along these lines)

if(username = 'USER', null(), username [except] where ramsno = '1234') as UserName

I'm sure you can see what i'm trying to do, is there any syntax etc that i can use instead of [except] in the example above? Is this possible?

1 Solution

Accepted Solutions
vgutkovsky
Master II
Master II

Richard,

Try this:

if(username = 'USER', null(), if (ramsno='1234',null(),Username)) as UserName
. The second null() could be replaced by something else if you want a different action to be taken should ramsno=1234...

Regards,

View solution in original post

2 Replies
vgutkovsky
Master II
Master II

Richard,

Try this:

if(username = 'USER', null(), if (ramsno='1234',null(),Username)) as UserName
. The second null() could be replaced by something else if you want a different action to be taken should ramsno=1234...

Regards,

Not applicable
Author

Thanks Vlad, perfect...