Alteryx Designer Desktop Discussions

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

Alteryx Pairing Reversals Workflow

meljundi002
6 - Meteoroid

Hello everyone, I've been spinning my wheels on this problem for waaay too long. Basically I'm trying to build a workflow which adds a column to my original data set. Let's call this column "Netting". My goal is to match each pair of debits and credits to each other so they net out to exactly zero. My problem arise when the debit and credit counts are not the same, for example in rows 1 to 3, we have 2 debits and 1 credit amount. Only 2 of those should be flagged as "Yes" in the netting column, while the extra debit should be either null or "No".

 

If anyone can help me with this it would be greatly appreciated. I've attached a workflow to help visualize what the current population looks like. I do have instances in my population which have 10 debits and 7 credits for example, so I only neet 7 of those debits to be flagged and all of the credits.

 

Thanks in advance! 

 

meljundi002_0-1669932661329.png

 

14 REPLIES 14
PanPP
Alteryx Alumni (Retired)

Hi @meljundi002,

 

Can you provide an example of what your output data format would look like?

meljundi002
6 - Meteoroid

The green column would be the desired output from my workflow

 

meljundi002_0-1669933662832.png

 

binuacs
20 - Arcturus

@meljundi002 One way of doing this with the Multi-Row tool

 

binuacs_0-1669934802327.png

 

meljundi002
6 - Meteoroid

Doesn't quite work after I add in more rows. For example for account 1234, I included 4 debits and 1 credit and ran it again and this is what I ended up with. It should only be pairing the same amount of debits to the credits for each respective account.

 

meljundi002_0-1669935266647.png

 

binuacs
20 - Arcturus

@meljundi002 workflow updated. Can you try now?

binuacs_0-1669936222908.png

 

meljundi002
6 - Meteoroid

Still doesn't quite work. I believe the issue is that you're sorting by value and deducting it from the row before it. The problem starts if you have 2+ consecutive credits followed by 2+ debits. Please refer to the updated workflow and screenshot, since I added an additional row for account # 1234 to explain this issue

 

meljundi002_0-1669941997433.png

 

binuacs
20 - Arcturus

@meljundi002 I updated the workflow with your input file

 

binuacs_0-1670022782483.png

 

meljundi002
6 - Meteoroid

Hi, sorry for the delayed response. So in theory it should work, but when I apply it to my population it seems to be working for some, but not all.

 

I've attached a new workflow with an expanded population of 60 for demonstration. Sorry for the headache, but my entire work is being held up by this, so your help has been a lifeline here.

 

meljundi002_0-1670210541956.png

 

 

meljundi002
6 - Meteoroid

@binuacs 

 

bumping this thread since I need an answer for this or else my manager is going to chew me alive 😣

Labels