Free Trial

Alteryx Designer Desktop Discussions

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

Alteryx not calculating the difference between two columns correctly

jportello
8 - Asteroid

I have a simple workflow calculating the difference between two periods but the formula isn't working correctly. I have attached snip of workflow and excel of the output showing the inaccuracies. (some of the rows are being calculated correctly)

14 REPLIES 14
apathetichell
19 - Altair

There's alot of very small pieces of data here - and I can't exactly see what you have as your error. could you zoom in on it and highlight it in red?

also - you may want to you fixed decimal 25.8 or whatever to prevent the infintesimal entities from not being rounded to zero (or you may want to round your number to .0000001 or whatever. Your formula tool is showing you basically zero.

Raj
16 - Nebula

@jportello 
try this 
Round(tonumber([7_2023])-tonumber([7_2024]),0.00001)

the result you are getting is very very small and does not have any value to it 
this should work

hope this helps.

jportello
8 - Asteroid

There is no error in my workflow which is why you didnt see it. It runs fine but the output is not correct, if you look at the excel file I attached you can see the change that Alteryx comes up with versus the correct change.  (data in excel is pivoted on the GMR004)

jportello
8 - Asteroid

When I tried the formula you suggested I received an error... see snip

apathetichell
19 - Altair

round doesn't take arugments in '' so it's not round(tostring([field]),'.00001') - it's round(tostring([field]),.000001)

 

Your screenshots are too small. I cannot see what your error is. That is a simple request. Upload a higher resolution screenshot. 

jportello
8 - Asteroid

This is what happens when I try the tostring formula (see snip)

apathetichell
19 - Altair

You are missing a ) around the parenthesis of the tostring---- so round(tostring(field),value)

 

having said that - you should know if this is just rounding or if this is a data issue. If this is a data issue - we'd need to see some data before your Alteryx formula and what Alteryx is saying. There are three possibilities:

 

1) rounding - this will fix.

2) data - the data you think is there is not there - or the formula you think you wrote is off.

3) alteryx/excel bug. one of them has a bug. 

jportello
8 - Asteroid

The formula is missing part of the end which you can see in the screenshot.

 

Also as requested, you can see the data before the formula tool in the screenshot.

apathetichell
19 - Altair

',mult' is wrong - it is part of the instructions for how to use the function. you should follow my formula. This is pretty straight forward - round takes two numbers. the initial suggestion was incorrect because it put the value to round to in quotes. the formatting of tostring was accurate. 

Labels
Top Solution Authors