In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Need assistance with formula tool

bh1789
8 - Asteroid

I have copied formula in .png file:

 

output column is Value Trimmed and data type is Double

if contains ([Value], "%") then [Value Trimmed]/100 else [Value Trimmed] endif

 

when Value=98.05% the above formula outputs 0.9805 as expected

 

however, when Value="N/A" the above formula outputs N/A as [Null]

 

how would I update the above to include N/A in the output when Value=N/A?

 

Thank you

2 REPLIES 2
rzdodson
12 - Quasar

From the looks of it, you are attempting to work with Double and Strings within the same formula structure without the proper IsNubmer or IsString syntax.

Here is an example of how one can wrap the IsNumber function to perform the calculation on a string field where the data appears to be numeric.

 

Solution.png

binu_acs
21 - Polaris

@bh1789 You need to change the data type from double to String to include the 'N/A'

If Contains([Value], '%') Then [Value Trimmed] /100 
ElseIF [Value] = 'N/A' Then 'N/A'
Else [Value Trimmed]
EndIF
Labels
Top Solution Authors