In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
Start 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
19 - Altair
19 - Altair

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!

binu_acs
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
19 - Altair
19 - Altair

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

alexnajm
19 - Altair
19 - Altair

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