Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Converting Extreme Negative Exponents to 0

LuckyMcG
5 - Atom

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!

5 REPLIES 5
vizAlter
12 - Quasar

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

 

vizAlter_0-1600883248892.png

 

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.

 

ImadZidan
12 - Quasar

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.

LuckyMcG
5 - Atom

Hello @ImadZIdan
I did convert to a number but did not have them return zero, but that function helps out! Thank you!

LuckyMcG
5 - Atom

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.

vizAlter
12 - Quasar

@LuckyMcG — Thank you! Welcome to the Alteryx Community!

Labels
Top Solution Authors