Alteryx not calculating the difference between two columns correctly
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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)
- Labels:
- Common Use Cases
- Output
- Transformation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
When I tried the formula you suggested I received an error... see snip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This is what happens when I try the tostring formula (see snip)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
',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.
