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

Not good at load scripts!

I am sure this will be an easy question for most of you but I can not figure out the syntax of the if statement in my load script....

If the referral status ID equals 100 OR 200 then I want to flag it with a 1!

IF(REFERRAL_STATUS_ID <> ('100','200') ,1,0)

...I am not good at coding!

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

if(match(REFERRAL_STATUS_ID,100,200),1,0) as Flag

If you want the opposite switch around the 1 and 0.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

if(match(REFERRAL_STATUS_ID,100,200),1,0) as Flag

If you want the opposite switch around the 1 and 0.


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you, I have not used Match before!

israrkhan
Specialist II
Specialist II

hi, try this

IF( REFERRAL_STATUS_ID = 100 OR REFERRAL_STATUS_ID = 200 ,1,0) AS Flag.

Hope it help...

Khan