Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i got a calculation with odd function that gives me -1 or 0 if it's even, but i want to have this null values, can i set some value, like 3 if it's odd in script?
Even get me null and even gets me -1 or 1
Br
Yes you can, the ODD() function is a boolean function that only evaluates integers, meaning it will return NULL if you try to evaluate decimals.
You can simply use the following expression to change to outcome:
if(ODD(<insert number field>)=-1, 3,1) AS OddNumber
in natural language: If the number I want to evaluate is an odd number, you're returning the value -1 for true, if that's the case, give me three instead, if it's not give me 1.