Alteryx Designer Desktop Discussions

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

Round to nearest whole number

BillyL14
8 - Asteroid

Hi

I am finding it surprisingly hard to round numbers to the nearest whole number, how can I do this?

 

Trying to use a function at the moment but keep getting nulls

 

Thanks

6 REPLIES 6
grazitti_sapna
17 - Castor

Hi @BillyL14 , could you post a sample dataset along with the desired output?I have mocked up a small workflow if this helps.

grazitti_sapna_0-1599836013156.png

 

As you are saying that you are getting nulls did you check if the field is set v_string or double?

 

Thanks.

Sapna Gupta
estherb47
15 - Aurora
15 - Aurora

Hi @BillyL14 

Here's a great article on the many ways to round in Alteryx: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-To-Round-Numeric-Values-with-th...

You'd want to use a 1 as the multiplier in the function itself. So Round([Number],1)

Let me know if that helps

 

Cheers!

Esther

BillyL14
8 - Asteroid

Hi

I have data type double at the moment, does it need to be changed?

 

This is a sample of what I am trying to do in excel, just want the alteryx equivalent

 

Thanks

grazitti_sapna
17 - Castor

Hi @BillyL14 , keep the datatype as double and try this, if it works please mark this post as solution.

grazitti_sapna_0-1599838824447.png

 

Thanks.

 

Sapna Gupta
BillyL14
8 - Asteroid

@grazitti_sapna @estherb47 

thanks both

Qiaoyi
5 - Atom

I know this is an 3 years old question lol. But allow me just post my idea here for your reference.

I tried and found that you can also do it by changing the field type to "fixedDecimal" and size as "19.0". It should also round it to the nearest integer.

Labels