The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

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

atarahoward
メテオロイド

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件の返信7
cjaneczko
パルサー

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. 

binu_acs
ポラリス

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

binuacs_0-1685467015998.png

 

atarahoward
メテオロイド

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
パルサー

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. 

binu_acs
ポラリス

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

 

atarahoward
メテオロイド

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
メテオロイド

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

atarahoward_0-1685469713266.png

 

ラベル
トップのソリューション投稿者