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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
skilloran
Contributor II
Contributor II

Conditional Statement in Data Load Editor

Hello,

I am new to Qlik and have been having some issues figuring this out.

One of the tables I am loading contains 1 field called FactType that the contents need to be broken into two parts for how I need my visualizations to look. Which of the 2 it defaults to depends on another fields contents

I am trying to create an IF statement that says along the lines of: IF field1 contains 'A', then field2 =  'ABC'  and IF field1 contains 'B',  then field2 = 'CBA'

Everything I have been trying keeps resulting in the error of "Field2 Not Found"

Script below:

NodeName as Desk,
floor(BusinessDate) as %CDATE,
Value,
ValueType,
'IR01' as FactType,
 if(ValueType LIKE 'IR01', FactType = 'IR01'), 
 if(ValueType LIKE 'MV', FactType = 'Market Value')
'A' as Table
FROM database
(qvd)
where exists(Desk,NodeName);

11 Replies
skilloran
Contributor II
Contributor II
Author

The following script completed what I needed it to:

If(WildMatch(ValueType, '*IR*'), 'IR01', 'Market Value') as FactType,

Thank you again for all your help!

sunny_talwar

Superb