Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi Guys,
I'm struggling to write the following formula using IF and OR
IF Anp_SPIKE_Class_lead1 is equal to '1' OR Anp_SPIKE_Class_lead2 is equal to '1' then Fill in '1' ELSE Fill in '0' END
IF (OR Anp_SPIKE_Class_lead1==1, Anp_SPIKE_Class_lead2==1, 1, 0)
Any help would be greatly appreciated.
Thank you.
You have not said where in DSS you are trying to write this formula. I'm going to guess that you are trying to use a visual recipe formula step.
In that case you were very close. You might try an extra set of "(" and ")" and the functions "if" and "or" are case sensitive. Try something like this.
if(or(Anp_SPIKE_Class_lead1==1, Anp_SPIKE_Class_lead2==1), 1, 0)
I hope that help out.
Here is a link to a related conversation if the above does not work out for you.
https://community.dataiku.com/t5/Using-Dataiku-DSS/Nested-IF-with-OR-inbetween/td-p/10987
Welcome to the Dataiku Community.
Superb! Thank you, Tom.
You have not said where in DSS you are trying to write this formula. I'm going to guess that you are trying to use a visual recipe formula step.
In that case you were very close. You might try an extra set of "(" and ")" and the functions "if" and "or" are case sensitive. Try something like this.
if(or(Anp_SPIKE_Class_lead1==1, Anp_SPIKE_Class_lead2==1), 1, 0)
I hope that help out.
Here is a link to a related conversation if the above does not work out for you.
https://community.dataiku.com/t5/Using-Dataiku-DSS/Nested-IF-with-OR-inbetween/td-p/10987
Welcome to the Dataiku Community.
Superb! Thank you, Tom.