Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
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