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 Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula for numbers and string mixture

calvincarr29
8 - Asteroid

I need a formula for:

 

Column Name: Account Number

 

If Account Number contains a letter then it's a string otherwise it's a number

 

 

7 REPLIES 7
binu_acs
21 - Polaris
calvincarr29
8 - Asteroid

@binu_acs Coming through with the solution again. Thank you. But I need more of a conversion. 

 

I'm spitting this workflow into an excel template with formulas. However, the excel formulas aren't working because it's reading Account Numbers as a text rather than numbers. I want to eliminate having to manually convert them in excel.

 

 
 

aa.PNG

 

binu_acs
21 - Polaris

@calvincarr29 The account number field contains both numeric and string, therefore the entire field will be considered as string data type. 

calvincarr29
8 - Asteroid

IIF([Account Number], [Account Number],IsString([Account Number])) is producing

bb.PNG

 

It gets rid of the one with letters which I don't want

 

 

binu_acs
21 - Polaris

@calvincarr29 in that case use the below formula m nake sure the output is selected as double data type

image.png

calvincarr29
8 - Asteroid

Is there a way to keep the numbers with the letters as well? 

 

If Account Number contains letters leave it alone otherwise convert to number.

binu_acs
21 - Polaris

@calvincarr29 That is not possible in Alteryx, a single field can't have two data types, If any of the values contains letters it will be considered as string type

 

Labels
Top Solution Authors