Hello all! I have a file from an older excel that is importing exponents such as 4.00000e-08. These should just be reading 0 as they are usually just a multiplication from decimals like .3% (.003). The data is a v_string so I tried using IF (field) contains 'e-' then (0) if else (field), but maybe my syntax is wrong. Thanks in advance!
Solved! Go to Solution.
Hi @LuckyMcG — Since you are data type is V_String (one of a String types), so try to use this expression in the Formula tool with Double data type:
IF Contains([Input_Column], "e-") THEN 0 ELSE ToNumber([Input_Column]) ENDIF
Please mark it "Solved" or "Solved" with a Like if it resolved your query. This will help other users find the same answer/resolution. Thank you.
Hello @LuckyMcG ,
If convert them to numbers, they will translate to 0 as they are really small number or you can a floor function after converting to numbers.
Hello @ImadZIdan
I did convert to a number but did not have them return zero, but that function helps out! Thank you!
Hey @VvizAlter
Thank you! That also worked for what I was doing. I don't know how the final output needs to look but I selected yours as the answer because it is correct based off the original data set.
@LuckyMcG — Thank you! Welcome to the Alteryx Community!