We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

String to Integer conversion

AKB
8 - Asteroid

I have a V_Wstring field containing the categories  'Left', 'Right' and [Null]. How do I convert these to numeric values, please, e.g. -1, +1, and 0?

 

Thx much -

1 REPLY 1
RolandSchubert
16 - Nebula
16 - Nebula

Hi @AKB ,

 

you could use a formula tool and assign the values using the Switch function:
Switch([Field1],0,'Left',1,'Right', -1)

([Null] and all other values would be converted to 0 in the calculated field)

 

Other options would be a Multi-Field formula tool (same logic, but you can use the same field and convert it to a numeric field type).

 

Best regards

 

Roland

 

 

 

Labels
Top Solution Authors