Alteryx Designer Desktop Discussions

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

How do I compare these two data sets to find matches based on two columns?

atarahoward
6 - Meteoroid

I'm trying to compare the sales order and line item number between two lists in the data sets attached. I've tried both join and union and get errors. Can someone show me how to compare these two data sets for matches based on sales order/doc number and corresponding line item/sd item number (including columns for the sales and costs) and return a list of sales orders in both data sets?

7 REPLIES 7
cjaneczko
13 - Pulsar

Add a Select tool before the Join tool for both of your inputs. Update the Sales Doc No and Line Item to VW_String 255. Then you should be able to join on those two fields. By default one of the documents was setting the value of the Sales Doc No and Line Item to Double. The join wont work if the data types are not the same in both inputs. 

binuacs
20 - Arcturus

@atarahoward Before joining the datasets you need to do some data cleansing

binuacs_0-1685467015998.png

 

atarahoward
6 - Meteoroid

Thank you, the file you uploaded does not open on my PC. When I update based on your screenshot I still get the error "String fields can only be joined to other string fields"

cjaneczko
13 - Pulsar

Use a Select tool before the join on both files and change the Sales Doc No and Item both to VW_String 255. This should solve the problem. 

binuacs
20 - Arcturus

@atarahoward attaching the workflow again and the input file I used for this

 

atarahoward
6 - Meteoroid

I'm now able to run with that update to VW_string, thank you!

 

I'm now seeing that my match is pulling different SD item/Sales order Item numbers, as if it's only returning matches on sales doc/Order num. How can I get it to only return lines where both the sales order and line item number match?

atarahoward_0-1685469581696.png

 

atarahoward
6 - Meteoroid

I just realized I needed to add the SD item/sales order item num to the join!

atarahoward_0-1685469713266.png

 

Labels