We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

value is changing when I am clicking on the result the tab

Sshasnk
8 - Asteroid

I have a data which is changing

 

Example:

value
0.009892

 

 

when I am clicking it twice the original value which is 0.0098125347 comes to the result tab

 

I want it to be

Output:

Value
0.009891

 

How can I change it

 

 

3 REPLIES 3
ChrisTX
16 - Nebula
16 - Nebula

If the field's data type is Double, you may be noticing the joy of floating point numbers.

 

Floating-point numbers: how computers store numbers: they use base-2, and base-2 cannot represent "some" base-10 decimals. This leads to simple decimal numbers appearing differently or rounding differently than expected.

The only way to correct this is to stick with integer math, as all base-10 integers can be represented correctly in base-2.

 

I created the attached Word document with all of the information I've seen on the topic, including Solutions for things like "round to 1 decimal place", "round to 2 decimal places".

 

Chris

Sshasnk
8 - Asteroid

@ChrisTX Still could not figure out the solution from the docs

ChrisTX
16 - Nebula
16 - Nebula

Did you try

 

round to 1 decimal place
FLOOR(Round(Round([MyNumber], .0001), .1) * 10 ) / 10
or
ROUND([MyNumber] + 0.00000001, 0.1)

 

and adjust the formulas for the number of decimal places you want?

Labels
Top Solution Authors