Good Morning Team
In Data 360 I am creating a Formula and using the TEXT function
Findbut the behavior is weird
IF(FIND('+','+23'),true,false)
Return FALSE
IF(FIND('+','2+3'),true,false) OR IF(FIND('+','23+'),true,false)
Return TRUE
Any help will be appreciated
2 answers
What is actually happening is, the first example returns 0 i.e. position of '+' in the string which is interpreted as false and the second example returns 1 i.e. position of text in the string which is interpreted as true. So, effectively :
- For first; IF(0, true, false) returns false because 0 is always treated as false
- For second; IF(1, true, false) returns true because any non-zero value either positive or negative is treated as true.
You may have to think of the formula a bit differently depending on what you intend to achieve.