community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Trouble converting string to numbers?

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!

Alteryx Certified Partner
Alteryx Certified Partner

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,

Meteor

So simple! Thank you

Labels