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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Myles
Contributor
Contributor

Can you create conditional if then else logic in the Data Prep tool?

I'm trying to do some logic in the Data Prep tool with if then else, but I do not see how.

 

IF [dataset_a].[column_3] = "Dorothy" AND [dataset_a].[column_4] = "Wizard of Oz" THEN "Rainbow"

ELSE LOOKUP [dataset_a].[column_7] AGAINST [dataset_b].[column_1] RETURN [dataset_b].[column_5]

 

I can do the lookup fine, but how do I do the if this and that then else logic?

 

If I have to go outside of the tool then the tool will not do. I do not want to write a Talend job with tMap logic.

 

Thanks,

Myles

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Myles,

 

There is no direct if/then/else functions in Data Prep... but you can play with filters to get this logic. You can filter on a dedicated value and retain the dataset against this value with functions like "Keep these filtered rows" for example. See the attached screenshot.

 

Regards,

Patrick

View solution in original post

4 Replies
Anonymous
Not applicable

Hi Myles,

 

There is no direct if/then/else functions in Data Prep... but you can play with filters to get this logic. You can filter on a dedicated value and retain the dataset against this value with functions like "Keep these filtered rows" for example. See the attached screenshot.

 

Regards,

Patrick

Myles
Contributor
Contributor
Author

Thanks Patrick.  I saw the filtering example in a how to, but I want to keep the all the data.

 

- Myles

Anonymous
Not applicable

And by the way, there is a dedicated topic in the online doc for that: https://help.talend.com/reader/stPif1ZSGQHZQ88m_d19mg/TxjabS_sKBjXRebpg78YHA

 

Cheers,

Patrick

Myles
Contributor
Contributor
Author

Yes, that's the one I saw before posting my question here. Thanks again.