Alteryx Designer Desktop Discussions

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

Matching Fields

Hi All

I have a file with a number of different investments across two datasets which I have joined into one stream with a number of other fields as well similar to the below example. My goal is to combine the data into one line that matches each investment and all the other fields involved.

InvestmentInvestmentFilePrice1Price2Field1Field2Field3Field4Field5Field6
A   DataDataDataDataDataData
B   DataDataDataDataDataData
C   DataDataDataDataDataData
 A12      
 B34      
 C56      

 

My desired end result would be similar to the below

 

InvestmentInvestmentFilePrice1Price2Field1Field2Field3Field4Field5Field6
AA12DataDataDataDataDataData
BB34DataDataDataDataDataData
CC56DataDataDataDataDataData

 

I have tried using the transpose and cross tab functions but with all the other columns it isn't working well.

Anyone have an idea of how I would accomplish the desired results?

 

Thank you in advance!

5 ANTWORTEN 5
ScottLewis
Comet

Filter your data stream into two sets on whether the Investment Column is (Blank or NULL) After that you should just be able to do a normal join. It gets a little more complicated if either of the two stacked data sets can have more than one row per Investment but the example doesn't show that. If your data is like that post up and we can talk about how to solve the harder case.

 

usmanbashir
Bolide

Instead of appending the two data sets (union), perform a join where the key is on Investment. 

ScottLewis
Comet

I made the assumption that the union happened before bringing the data into Alteryx. If the union is something you're doing then usmanbashir's answer is correct, you should just be joining rather than unioning.

 

If it is coming in stacked like that here's the logic to split it and recombine.

nagakavyasri
Quasar

@arosenberg1995 Use Join instead of Union. Union appends data vertically, Join appends data horizontally.

 

Screenshot 2024-03-08 140909.png

Thank you all, this worked for me. Appreciate it.

Beschriftungen