Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How to join and stack at the same time

kfish
7 - Meteor

Hello,

 

I am trying to two data tables with the exact same structure. For example, My first table might look like,

CodeValue 1Value 2
11.1Desc
2  
32.5Desc

 

And the second table:

 

CodeValue 1Value 2

1

  
22.2Desc
3 

 

 

I want it to look like:

 

CodeValue 1Value 2
11.1Desc
22.2Desc
32.5

Desc

 

But instead I get:

 

CodeValue 1Value 2Right_Value 1Right_Value 2
11.1Desc  
2  2.2

Desc

32.5Desc 

 

 

How do I get my desired table? The data in question is much more complicated with around 15,000 rows and 200 columns. So my join is giving me 15,000 rows and 400 columns. I've also tried a union but that just gives my 30,000 rows.

 

If it helps the tables definitely have the same name as they were creating within Alteryx off of two other tables being joined together on different primary keys.

 

Thank you!

4 REPLIES 4
clmc9601
13 - Pulsar
13 - Pulsar

Hi @kfish,

 

Would this work?

 

Screen Shot 2021-03-06 at 9.11.05 AM.png 

 

Hope it helps!

Qiu
20 - Arcturus
20 - Arcturus

A bit different approach

New Workflow3A.PNG

AndrewS
11 - Bolide

Hi @kfish ,

 

Option # 3 attached - surely we can come up with a few more!

 

kfish.PNG

SeanAdams
17 - Castor
17 - Castor

hey @kfish 

 

the way to know if you're stacking or joining is if the column structure is the same, you're generally stacking - if you want to add columns you're joining.   Think of a join as a way of enriching your data.

 

Simple solution here:

  • Union the two data sets together to get one long list.   You'll have blanks in this
  • Now you want to look for blanks across all fields at once.  To do this -
    • change the fields from columns to rows using a transpose
    • Filter out the blanks
    • Cross-tab back into the original format
  • If you want to add a default value if you still have missing values - then you
    • can union to a default values list (text tool)
    • use a unique to remove duplicates

 

 
Labels