Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Round to 5 decimal places

Paddi
8 - Asteroid

Hi all,

 

I'm currently working on an issue to round the data to 5 decimal places. It is simple in excel, but I'm wondering how can it be done by alteryx.

The sample data has been attached. 

 

Thank you so much.

 

Paddi_0-1669173013926.png

 

14 REPLIES 14
gautiergodard
13 - Pulsar

hey @Paddi 

you can use the formula below. 

 

Round(Round([YOUR NUMBER FIELD], .000001),.00001)

Please accept as solution if this worked for you!

 

Hope this helps! 

Raj
16 - Nebula

hi 

you can use Round(ToNumber([number]),.00001) 

hope this helps 

please marked solved

KrishnaChithrathil
11 - Bolide

@Paddi 

KrishnaChithrathil_0-1669180569342.png

 

ShankerV
17 - Castor

Hi @Paddi 

 

Please find my solution below.

 

If I understand your requirement exactly, where you need to round of to 5 decimal places.

Especially 2.682103 need to be round for 2.68210

 

If you use just Round([Field1], .00001) will give the output as 2.6821 and not 2.68210 which you are expecting.

 

So one step in additional implanted to get your expected solution.

 

ShankerV_0-1669182331059.png

 

Kindly accept this solution if it provided a solution to your question.

 

Many thanks

Shanker V

 

ShankerV
17 - Castor

Hi @Paddi 

 

My workflow:

 

ShankerV_0-1669182763033.png

 

Step 1: Input

ShankerV_1-1669182816621.png

 

Step 2: Formula tool

ShankerV_2-1669182839310.png

 

Output as expected like 2.68210

 

ShankerV_3-1669182898027.png

 

Kindly accept this solution if it provided a solution to your question.

 

Many thanks

Shanker V

 

 

 

 

 

Fangfang
6 - Meteoroid

Hi , this is Paddi's coworker,  may i ask you to test 4.655665? it should be round to 4.65567, but failed by whichever solutions. Hope to know the reason. 

 

 

Fangfang_0-1669193536028.png

 

DataNath
17 - Castor
17 - Castor

@Fangfang @Paddi the following gets you to your expected outcome:

 

Round([Input], 0.000010)

 

DataNath_0-1669195211238.png

ShankerV
17 - Castor

Hi @Paddi @Fangfang 

 

Please find the solution for your latest issue posted.

 

ShankerV_0-1669195551252.png

 

Kindly accept this solution if it provided a solution to your question.

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @Paddi @Fangfang 

 

Step 1: Input

 

ShankerV_0-1669196590473.png

 

Step 2: Regex tool

 

ShankerV_1-1669196614800.png

 

Step 3: Formula tool

Round(tonumber([Field1]), .00001)

 

PadRight(tostring([Out1]),7,'0')

 

if([RegExOut1]='5')
then tonumber([Out1])+0.00001
else [Out1]
endif

 

 

ShankerV_2-1669196646932.png

 

Output:

 

ShankerV_3-1669196688789.png

 

Kindly accept this solution if it provided a solution to your question.

 

Many thanks

Shanker V

 

 

Labels