Numerical Matches to 2, or3 , or 3 decimal places
- 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 am trying to match to sets of numbers were rounding is an issue so one side it could be 300.02 and on the other is 300.04, and for another entry the difference between them is 300.02 and 300.03 so the difference between the numbers is not bigger than 0.02. is there a way to create a join/match like this where we can set a max margin difference between them using a single tool a combination.
Thank you i
compare two data sets where I have two set of data that have sales that can differ
- Labels:
- Join
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @dialpemo1
I attached an example of we are calculating two decimal up and down and matching it with the other dataset.
Pedro.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @dialpemo1
There is no single-tool solution for what you're trying to do, but like @pedrodrfaria has shown, you can do this with a few tools.
Some considerations:
- If you're doing an approximate match, then you're likely to get multiple hits (some of which will be false matches) so you'll need to think about how you want to handle this (e.g. closest first?)
- You can do this with a few simple joins:
- Use a formula tool to do a floor function to get the round-down - add this as a new field. Same for the Ceiling function
- Do the same for your other data set
- Then join floor to floor; floor to ceiling; ceiling to ceiling; ceiling to floor; and union the joins back together.
@pedrodrfaria 's solution is probably more elegant - as long as you spend the time to think through what you will do to detect and address multiple match situations.