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

Alteryx designer Discussions

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

Changing numbers to % format

Asteroid

Hi 

 

I have a few columns with numeric data. Data type is Double.

 

My goal is to change the data format to %. 

 

I used the Multi-Field Formula to multiply data by 100.

 

How do I add "%" to those fields? 

 

Thanks

Quasar

Hi @cwoo

 

To show the percentage sign you'll have to store your number as string. In that case you can change the data type in your multi field formula to string. Bundle your current formula in a tostring(....) and add a +'%'. 

 

Hope that works!

Kat

Highlighted
Pulsar

Unfortunately, there isn't a way to add a  percentage sign AND keep them as a numeric field. If they don't need to be numeric, you can change the fields to a string and manually add the '%'.  You can do all of that with the same Multi-Field Formula tool:

image.png

Meteor

If you want to be able to use the field for calculations in formulas you will need to divide the field by 100 to get it into a decimal form by using the formula field.

 

If you want to add the actual '%' you will need to convert the field to a string format and then use the formula field to add the % sign, but then you will be unable to use in it mathematical formulas.

 

-Robert

Asteroid

Hi @danrh

 

So I did that but I am seeing an error message. Please see below. 

 

Do I have to change the original fields data type to something? It is currently Double. 

 

%.PNG

Meteor

I would use the select tool that you have there to change the data type to a string and then just use the formula tool to set the field equal to itself  + ' %'.

I believe the error is occurring because it hasn't changed it to a string before you are adding the %

Asteroid

I didn't change output type to String - thus the issue. 

 

Thanks!

 

Labels