How to use && or || in case when statements
new_to_dataiku
Dataiku DSS Core Designer, Registered Posts: 1 ✭✭✭✭
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
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
Answers
-
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