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

Condition output whole number

beattyb
6 - Meteoroid
Hello, I am trying to create a workflow that will output whole trade prices (ie 126.35312) and if fractional price is present, will convert fraction price to whole price (ie 126-11.3). 126-11.3 (fractional number) (11.3/32 = .35312) 126.35312 (whole price) Thank you!
2 REPLIES 2
estherb47
15 - Aurora
15 - Aurora

Hi @beattyb 

 

If you're always dividing by 32 in the fractional number, you can try this formula in a Formula tool. Create a new field with a double data type:

 

IF Contains([number],"-") THEN tonumber(left([Number],findstring([number],"-")))+tonumber(right([Number],length([number])-FindString([Number], "-")-1))/32
ELSE [Number]
ENDIF

 

Let me know if that helps!

 

Cheers,

Esther

beattyb
6 - Meteoroid
I'm assuming where you have [Number] would be the field for price?
Labels
Top Solution Authors