Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

case to if

Hi all,

I'm trying to replicate the below statement in qlikview load script.

CASE WHEN (`Field1`-`Field2`) = 0 AND `Field3` = 0 THEN 'No' ELSE 'Yes' END

Thanks

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

May be this?

IF(Field1-Field2 = 0 AND Field3 = 0, 'No', 'Yes') AS YourNewFieldName

View solution in original post

5 Replies
vishsaggi
Champion III
Champion III

May be this?

IF(Field1-Field2 = 0 AND Field3 = 0, 'No', 'Yes') AS YourNewFieldName

ahaahaaha
Partner - Master
Partner - Master

Hi,

May be (for script code)

IF Field1-Field2 = 0 And Field3 = 0

'No'

ELSE

'Yes'

END IF

zhuravlevleonid
Contributor II
Contributor II

Didnt you forget to add word "SQL" before Select?

Not applicable
Author

Thank you Vishwarath

Sergey_Shuklin
Specialist
Specialist

Hello, Naveen!


It's the same is (if you want it within script):

IF(Field1-Field2=0 AND Field3=0,'No','Yes') as FLG