Hi,
I have this field, Franchise Loans, that can have 3 possible values - NULL, 00000000, or some number. I want to call out where there is a number.
I have this IF statement: IF ([FRANCHISE_LN] != '00000000' OR !IsNull([FRANCHISE_LN])) THEN 'Y' ELSE 'N' ENDIF where it should be calling out where it's not the 00000000 or NULL value and only flag Y where that does not happen but instead it flags Y for every single value, including where it is NULL or 00000000.
How do i fix this?
Solved! Go to Solution.
Instead of OR, change it to AND
@kfishtd This is a confusing part of using ! in formulas. The problem here is that you need to be using AND instead of OR in your formula.
@kfishtd this should be AND instead of OR
To explain what's going wrong in your current approach, in the case of 00000000 - this satisfies the !IsNull() check and in the case of the null, this satisfies the != '00000000' check. The other values satisfy both of these and therefore everything is currently flagged as 'Y'.
Hey @kfishtd,
Is this the result you are looking for:
IF [FRANCHISE_LN] = '00000000' OR [FRANCHISE_LN] = NULL() THEN 'Y' ELSE 'N' ENDIF
The community has some quick and easy videos on formulas and the Formula Tool here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Writing%20...
Any questions or issues please ask
Ira Watt
Technical Consultant
Watt@Bulien.com
Thank you all! I was missing doing an AND rather than an OR which is somewhat confusing when it isn't truly an AND logic statement it only is since its doing a double negative essentially