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.

Decimal Issue

zqlcancer
8 - Asteroid

I am having issues with the decimal data. As you can see from my attached workflow, column 'round' should be equal with column 'tax'. But in my formula, number 3 and number 4 return false data, how can I fix it?

 

 

Decimal.jpg

6 REPLIES 6
Fazalrahman
5 - Atom

Please find the attached workflow

aatalai
15 - Aurora

@zqlcancer try this

Raj
16 - Nebula

@zqlcancer 
hope this helps.

danilang
19 - Altair
19 - Altair

Hi @zqlcancer 

 

Look at this post.  It explains why you're seeing rounding issues and gives a few ways that you can work around it.

 

 

Dan

apathetichell
20 - Arcturus

Want to see something cool - try this:

IF round(round([Sales]/[Rate],0.1)-[Tax],.000000000000001)=0
THEN "ok"
ELSE "Wrong"
ENDIF

 

Then try this:

IF round(round([Sales]/[Rate],0.1)-[Tax],.0000000000000001)=0
THEN "ok"
ELSE "Wrong"
ENDIF

 

 

zqlcancer
8 - Asteroid

Regret to say that current solution does not resolve my issue. It looks like we need accept a very small amount of difference in some cases when using rounding. Look at my example below,-58.305 should be rounded to -58.31. But it just does not work in my case.

 

Decimal1.jpg

Labels
Top Solution Authors