We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Combining several tables from one sheet into 1 data set based on columns

tmrwall
5 - Atom

I would like to combine several tables from one excel spreadsheet into one with the table header as a field, based on common fields. In the example below I have included 2 tables but the Product 2 table repeats 6 times with an inconsistent number of null columns between tables. Thanks in advance!

 

Table 1: Starting format of the excel sheet

Product 1       Product 2  
     Product 1b     
YearABCDCD YearCD
20101713192531 20103743
20112814202632 20113844
20123915212733 20123945
201341016222834 20134046
201451117232935 20144147
201561218243036 20154248

 

Table 2: The format I would like the result to take

YearProductABCD
2010Product 1171319
2011Product 1281420
2012Product 1391521
2013Product 14101622
2014Product 15111723
2015Product 16121824
2010Product 1b172531
2011Product 1b282632
2012Product 1b392733
2013Product 1b4102834
2014Product 1b5112935
2015Product 1b6123036
2010Product 2173743
2011Product 2283844
2012Product 2393945
2013Product 24104046
2014Product 25114147
2015Product 26124248
1 REPLY 1
BS_THE_ANALYST
15 - Aurora
15 - Aurora

@tmrwall Solution needs refining but it gets the job done. I'd seriously suggest have complete data in the beginning. There's lots of assumptions to make based off your 'Table 1' and lots of missing columns. For instance. Product 1b and Product 2 both receive columns A and B even though they don't exist in the table. Therefore, Alteryx has to create this for you. There's no reason to omit columns of data; it makes everything a lot more challenging.

 

You've got Product Names spanning two rows. The solution accounts for this but it's difficult to understand why that happens.

Screenshot 2023-10-30 110006.png

All the best,

BS

All the best,
BS

LinkedIN

Bulien
Labels
Top Solution Authors