community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.6

Looks aren't everything... But the latest Community refresh looks darn good!

Learn More
SOLVED

Match on Opposite direction & Non-matching Amounts within tolerance

Highlighted
Meteoroid

Hi

 

I'm trying to match on the following - Currency must be the same, Origin must be opposite, Amounts must be opposite directions but can be within 1% tolerance. Could anyone help?

 

CurrencyOriginAmountMatch ID
USDOur501
USDTheir-501
AUDOur1002
AUDTheir-992
BRLOur203
SAROur-204
Asteroid

I'm assuming you mean you want to create something like the Match ID field you have in the screenshot? But maybe I'm misunderstanding.

 

If so, you might try something like:

  • filter on [origin]="Our"
  • join the true stream of the filter tool to the false stream on [Currency]=[Currency] so those match
  • filter requiring the absolute value of the left [Amount] field plus the right [Amount] field being less than or equal to 1 (so these are opposites within 1)
  • add a recordID to generate the match ID

 

Bolide

Hello @nsarayar 

 

I would agree with @adamorse on the steps, but change one thing. The last filter I would do your 1% calculation. I have attached a workflow with an input toll of your data. I adjusted the data for one row so you could see the 1% tolerance filtering one record out. Hope this helps!

Meteoroid

Thank you @cplewis90 !! I tried this before seeing your solution in such a roundabout way and your solution worked a treat in a few steps

Labels