Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Round a number

bh1789
8 - Asteroid

if the below data is coming through as V-WString:

 

0.19741

 

How would I round it to a number of 20%?

 

 

Thank you

 

7 REPLIES 7
alexnajm
17 - Castor
17 - Castor

Round(ToNumber([Data])*100, 1)

 

if you want to show the percent sign, you’d have to force it back to string using ToString and adding the “%” at the end!

binuacs
21 - Polaris

@bh1789 one way of doing this, note that  you cannot make it numeric format because % is string type, so when you add % the data should be in string data type

image.png

bh1789
8 - Asteroid

Thank you very much!  Your solution gave me what I needed from metric, to rounding to percent

bh1789
8 - Asteroid

[numerator]/[denominator]*100 gave me 4.4444444 (numerator was 56 and denominator was 1260)

Round(ToNumber([Metric])*100,1) gave me 444

ToString([Round], 2) + '%' gave me 444%

 

How would I get 4.44%?

alexnajm
17 - Castor
17 - Castor

You are multiplying the Metric by 100 in your second statement...

alexnajm
17 - Castor
17 - Castor

And you are rounding to the nearest whole number - correct both and you should be fine

bh1789
8 - Asteroid

That worked.  Thank you again!

Labels
Top Solution Authors