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.

Percentage string to numbers

wenyg
8 - Asteroid

Hi

  How to force a V string data with percentage sign to numbers?

 

 

4 REPLIES 4
SPetrie
13 - Pulsar

In your example, I would use a multi-field tool set to change output types to double and this formula.

 

tonumber(replace([_CurrentField_],"%",""))/100

 

 

Capture.PNG

wenyg
8 - Asteroid

Thanks,

I would still want it to be percentage sign like "78.88%" but the data type to be double/numeric

caltang
17 - Castor
17 - Castor

Unfortunately, that's not possible. The "%" makes it a string. Alteryx reads numeric data as is, the inclusion of a "%" forces it to be a string. 

 

So what @SPetrie did is the best way to handle that data. Unless you're willing to trade off the data type for its appearance, then there's no other way.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
ckussoy
6 - Meteoroid

Thank you! This question came up during my office hours with a student calculating bonus amounts into a multiplier.

-----------------------------------------------
Carolina Kussoy
Educator, Irvine Valley College
Faculty Advisory Committee Member, Alteryx SparkED
Email: ckussoy@ivc.edu
Labels
Top Solution Authors