Dataiku DSS 7 AMA is live! Learn more

How to use && or || in case when statements

Level 1
How to use && or || in case when statements
Can I write case statements as below?

case when A = "B" && A="any_string" || "another_string" then 'C' else (
case when A = "D" && E="any_integer" then 'F' else (
case when A = "G" && H="any_string" && K="any_integer" then "any_string" else "column_name" end
) end
) end
0 Kudos
1 Reply
Dataiker
Dataiker
Hi,

The syntax for Dataiku IF formulas is " if(condition, then, else)". For verifying conditions, you can also use "&&" for multiple AND, and "||" for multiple OR.

Please refer to our formula language documentation for other uses of formulae: https://doc.dataiku.com/dss/latest/advanced/formula.html

Hope it helps,

Alex
0 Kudos
Labels (2)