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

new_to_dataiku
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
Alex_Combessie
Dataiker Alumni
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

?
Labels (2)
A banner prompting to get Dataiku