Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Trouble converting string to numbers?

drewh
7 - Meteor

Hi all,

 

I'm trying to create a column that buckets the durations into a "31+" and "Less than 30" category. I tried converting the "duration" column to a number using the ToNumber function, but when I use the subsequent IF statement the data comes out riddled with errors below (e.g. row 1 is 4.28, clearly should not be in the 31+ bucket)

 

Sample3.png

 

I think the problem may be how I converted the string? Or is it something else? Attached my sample workflow for reference. Any help is greatly appreciated!

2 REPLIES 2
Thableaus
17 - Castor
17 - Castor

Hi @drewh

 

Change these two things - First, in your ToNumber formula, you must specify the field as a Double Type.

DoublePic.PNG

 

Then, you can also take off the single quotes around 30, so it is considered as numeric type.

 

TakeoffQuotes.PNG

 

Cheers,

drewh
7 - Meteor

So simple! Thank you

Labels