General Discussions

Discuss any topics that are not product-specific here.

Sorting data to match

dmakarenko3
5 - Atom

Hello community.

 

I have data set where I'm joining two different files and trying to flag differences in cost centers and gl accounts. However, I'm not able to sort them in the same order so I can match the left part and the right part of the table.  In excel, I can select left part and right part ranges independently of each other, and sort both separately in the exact same order and it seems to do the trick. Can anyone offer a solution?

 

dmakarenko3_1-1686754722561.png

 

 

2 REPLIES 2
caltang
17 - Castor
17 - Castor

When you join your data, you need to identify your primary and foreign keys, just like in SQL. In this case, I believe the encircled area acts as what you wish to join from both left and right tables, right?

 

In that case, the Join Tool should do the trick once you identify the Field which you want to join. If you need to sort, are you saying you wish to join the first of the left / right table? Are you having a many-to-many or one-to-many or many-to-one scenario?

 

Kindly provide some more context and your dataset to help us help you better.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Emmanuel_G
13 - Pulsar

Hi @dmakarenko3 

 

Bear in mind that if you join two datasets on a single code (in your case the cost centre and the gl account) the elements output by the "J" anchor of your join are necessarily identical in the two columns for each row. This is normal because the elements are output in "J". So you don't need to use a sort tool after that usually.

Labels