Alteryx Designer Desktop Discussions

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

Numerical Matches to 2, or3 , or 3 decimal places

dialpemo1
5 - Atom

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 

2 REPLIES 2
pedrodrfaria
13 - Pulsar

Hi @dialpemo1 

 

I attached an example of we are calculating two decimal up and down and matching it with the other dataset.

 

pedrodrfaria_0-1612972351633.png

 

Pedro.

 

SeanAdams
17 - Castor
17 - Castor

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.

Labels