I have a data set of apportionment percentages. The data type is double. There are a few negative percentages that I want to replace with zeros. I tried IF [Apportionment %] < 0 THEN "0" ELSE [Apportionment %] ENDIF, but I get an error message that says the formula "Apportionment %" resulted in a string but the field is numeric. Use ToNumber(...) if this is correct. The field "" is not contained in the record. What am I doing wrong here?? New to Alteryx, so please keep that in mind :)
Solved! Go to Solution.
You need to take the 0 out of the quotes. By putting it in quotes you are saying that you would like to return a string. Removing the quotes should do the trick!
If I remove the quotes, the error says the field "" is not contained in the record. I get the same error if I use the Max formula above.
Ah, that is because you need to choose the Apportionment % column in the "Select Column" drop down in the formula tool. If you don't pick the column then Alteryx doesn't know what data it is modifying.
I already had that chosen as well.
I still get the message "the field "" is not contained in the record (Expression #2)."
That means that you have another formula down below that doesn't have the output column selected.
That worked. Thank you!