Alteryx Designer Desktop Discussions

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

Join/Index Match with one source data file

mhn423
5 - Atom

Hello -

 

I have an Excel table (columns 1 to 4) for which I used Index/Match to extract data (column 5) - e.g., INDEX($D...$D,Match(A2,$A...$A,0)). 

Company Level 1Company Level 2Company Level 3Node DescriptionResult Desired
A11  EuropeEurope
A11499 EuropeEurope
A11 401Company Parent Europe, LimitedEurope
A11 403Company Parent Europe, Limited 2Europe
A11 407Company Technology Company LimitedEurope
A11 408Company Technology Company Limited 2Europe
A11 411Company Parent UK, Ltd.Europe
A11 413Company Parent UK, Ltd. Europe
A11 414UK EU EXPEurope
B22  ROWROW
B22300 LATAMROW
B22 301Company Parent Mexico S. de R.L. de C.VROW
B22 302zzzz-Company Parent Mexico S. de R.L. de C.V ROW
B22 311Company Brasil Solucoes de Pagamento Ltda.ROW
B22 312zzzz-Company Brasil Solucoes de Pagamento Ltda. ROW
B22 321Company Mexico, S. de R.L. de C.VROW

 

I am trying to replicate this in my Alteryx flow with Join (worfklow attached) and I am getting stumped. The results that I am getting replicates column A values for each change in column 4 (see attached results file).

mhn423_0-1624053228737.png

 

What can I do in the Alteryx flow to get the results that I am looking for?

 

Thank you.

7 REPLIES 7
Qiu
20 - Arcturus
20 - Arcturus

I think maybe a multi-row formula will get the result we need here.

0619-mhn423.PNG

mhn423
5 - Atom

Thanks for your reply! 

 

I actually don't want column A values to be replicated for each change in column D values. Right now, I have 16 rows of data, and I want to keep the 16 rows of data. I just want to add an additional column to lookup column A values and return column D values.

 

Maybe the solution is still with the Mulit-Row formula, I just don't know how to configure it so that my 16 rows of data doesn't turn into 130 rows of data.

Qiu
20 - Arcturus
20 - Arcturus

@mhn423 

Since its only 16 rows data, maybe you can give us a sample input and desired output to help us better understand the issue here? 😀

DawnDuong
13 - Pulsar
13 - Pulsar

hi @mhn423 

 

One thing i noticed is that the input only has 16 rows but the J output contains 130 rows. This is a red flag that the join condition is not unique.

 

A common mistake for new users of Alteryx when they use JOIN tool is that they forget to check that at least one of the JOIN condition must be "unique" otherwise you will get unexpected results of multiple rows of the same thing. 

 

In this case, in the .yxmd file, the JOIN condition is both on "Company level 1" for both L and R inputs and the field "Company level 1" does not uniquely identify a record in the data. That's why you have 130 join outputs when both L and R inputs only contain 16 records.

 

The attached excel does not contain the formula link, so I could not exactly follow the logic of how column E is supposed to be calculated. If you can re-upload the file with the formula, the community members likely can help you faster.

 

Cheers,
Dawn.

mhn423
5 - Atom

Thanks both for your help. Here is the Excel input file (sorry, I thought I had attached it when I posted my question.)

 

The data is in column A to D, and the desired output is in column E, with the index/match formula. I will also check my workflow to see how I can make the join condition unique.

 

Thanks

kelly_gilbert
13 - Pulsar

@mhn423 - I think you could use the Sample tool for this purpose.

In Excel, MATCH will return the row number for the first matching row. In your example, there are lots of rows that match to "A11" in column A, so it is returning the first row, since that is the first row that matched to "A11".

The equivalent in Alteryx would be using the Sample tool to return the first row for each Company Level 1:

kelly_gilbert_0-1624305988328.png

 

To @DawnDuong 's point, you want to be careful about the level of granularity on each side of your join. In this case, we know that the Sample tool will always output one row per Company Level 1, so you can then join back to the main data on Company Level 1 without getting duplicates.

mhn423
5 - Atom

Thanks so much @kelly_gilbert , that worked well as a solution!

 

Mimi

Labels