Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Rounding Solution Error

ethankutch
7 - Meteor

Hello,

 

I am trying to create a check that compares two of my fields ID_SumAmount and Sum_Check. In my workflow, this essentially makes sure that the number that was concatenated into my field External ID matches another field, Amount, that is usually the sum of multiple records.

 

I'm using the filter tool to filter out all the records that don't match, and one of the main reasons that has been plaguing me so far is rounding differences in data. To fix this I came up with this expression in my filter tool, "ABS([ID_SumAmount] - [Sum_Check])> [User.epsilon]." However I'm getting a parse error shown in the screenshot of my workflow. Both fields ID_SumAmount and Sum_Check are FixedDecimal for type, and [User.epsilon] is a constant I created which has a value of 0.0001 (which is what I thought would help with the rounding). 

 

If anyone has any idea of why I'm getting this parse error, or even a better way to fix this rounding error that would be much appreciated ( I tried (round([amount], 2) in earlier stages of the workflow but it persistently rounded values that had digits in the hundredths place to the nearest whole number :/) 

 

Thanks!

2 REPLIES 2
JamesCharnley
13 - Pulsar

Hi @ethankutch 

 


 

I tried (round([amount], 2) in earlier stages of the workflow

 



The final parameter that you enter in the round function is what will be rounded to, so this would round to the nearest 2.

 

Round([amount], 0.01) would round to the nearest hundredth.

danilang
19 - Altair
19 - Altair

Hi @ethankutch 

 

Make sure to check the box under the # column for your user constant.  This lets Alteryx know to treat this a numeric value

 

c.png

Dan

Labels
Top Solution Authors