Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Match tables data

Juacata
5 - Atom

I can't find the way to join two tables by a column and leave in null or blank the rows that doesn't exist in the first one.

 

Below you can see an example of how the information can come:

 

Juacata_0-1654283714513.png

This is what i need to output:

 

Age groupCount
Total # of Receivable2.495
0-30 Days807
30-60 Days788
+60 Days832
Total $ of Receivable36361895.9
0-30 Days14086065.61
30-60 Days14349579.53
+60 Days7926250.76
Total # of Payable3.102
0-30 Days 
30-60 Days915
+60 Days2.187
Total $ of Payable27787401.5
0-30 Days 
30-60 Days1252104.02
+60 Days15635297.48

 

 

7 REPLIES 7
stvnhdmpa
8 - Asteroid

@Juacata  What are you trying to join on?  I see the same data age groups duplicated, so it seems like you probably have multiple criteria.  Can you union the items that don't have a match?  If you can attach a sample, I'm happy to take a look.

JBLove
10 - Fireball

Hi @Juacata ,

 

Based on the details provided, it sounds like what you may want to add a union tool after the join tool to stack either the Left (L anchor) and Join (J anchor) outputs or the Join (J anchor) and Right (R anchor) outputs.

 

If the column names are the same you should be able to use automatically align by Column Name or position, but manually aligning is an option too.

ddiesel
13 - Pulsar
13 - Pulsar

Hi @Juacata!

 

There has GOT to be an easier way to do this, but here's where my brain went with it:

 

Capture.JPG

 

 

The tricky part is retaining the original order of fields while inserting missing ageing groups. This should be a dynamic solution even if the ageing groups change. If the ageing groups are always static, then we can take out some of these steps.

 

If anyone can come up with a simpler solution, I'd love to see it! In the meantime, please let us know if this works for you.


Thanks,

Deb

binuacs
21 - Polaris

@Juacata similar to @ddiesel approach

 

binuacs_0-1654379520293.png

 

Juacata
5 - Atom

It works perfect!! really appreciate your help! i'll never think of such a solution.

Juacata
5 - Atom

Nice solution too @binuacs , Thanks for your help!!

ddiesel
13 - Pulsar
13 - Pulsar

Glad it helped!

 

@binuacs, thank you for streamlining the logic! I liked your approach.

Labels
Top Solution Authors