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.
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
Top Solution Authors