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.
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.
Welcome to the Dataiku Community.