Alteryx Designer Desktop Discussions

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

Possible Rounding Bug?

mitstevens
5 - Atom

Hello!

 

I encountered unexpected behavior with Round() in the formula tool. Starting with a Text input with the following values:

 

1. 48.885

2. 0.885

3. 40.885

 

With the formula Round([Value],0.01), I would expect the following output

1. 48.89

2. 0.89

3. 40.89

 

However, the actual output is

1. 48.89

2. 0.89

3. 40.88

 

Can anyone help me understand what is going on here? Currently I have a formula workaround such that if the third decimal place is ever a 5, change it to a 6 to ensure rounding up.

12 REPLIES 12
flying008
14 - Magnetar

Hi, @mitstevens 

 

1- Round5Fix is a UDF function, so it may not be suitable for you to use on the Server, but you can still use the logic you describe to write formulas to avoid problems with this Round version.

2- CEIL functions do not have a decimal place option in older versions like v2021.x, so it is not recommended to use them unless you are sure that the current version is compatible.

apathetichell
18 - Pollux

Contact your rep - this needs a patch. This is a serious bug.

flying008
14 - Magnetar

Hi, @apathetichell 

 

After testing the formula Round(40.885, 0.01) on v2024.1.1.17, it still returns an incorrect result. (whether to turn AMP on or off)

Labels