Not Equal To Error?
- 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
Hello,
I am using the Filter tool to create a not equal to statement that states ([ID_SumAmount] != [Sum_Check])
In my data, there are 6 records that are being spit out as True, even though the values for ID_SumAmount and Sum_Check are the same.
I have checked the metadata for types but they are both doubles, and even when I export the data to excel to check for rounding errors they are still the same.
Can anyone help me figure out why these 6 records are being identified as not equal to each other?
I have attached pictures of the output as well as the workflow & example data.
Thanks,
Ethan
Solved! Go to Solution.
- Labels:
- Data Investigation
- Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ethankutch Try the below condition in the filter tool
round([ID_SumAmount],1) != round([Sum_Check],1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If you change both fields to fixed decimal, it works:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @ethankutch
Because of the way that computers store double values, they can appear the same, but differ in their 13th or smaller digit after the decimal point. The best way to deal with this is to use ABS([ID_SumAmount] - [Sum_Check])>epsilon as your filter. Define epsilon as required for the precision that you need. In banking the required precision might be 0.0001, for scientific work it might be 1e-10 or smaller.
Dan
