Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Columns rearrangement post Join tool

omkarshinde
8 - Asteroid

image.png
I have my left and right data column anchors of Join tool arranged in the desired order as above. However after join I wish to arrange them one after another without disturbing this order as shown below:
image.png
How can I achieve this? Help appreciated!
Note: This is just a mock data above and my real data contains over 100+ columns

18 REPLIES 18
omkarshinde
8 - Asteroid

@binuacs Thanks a ton. Any way I can insert comparison columns adjacent to each of these pairs now?
Example-
ID column    Right_ID column     Comparison column

binuacs
21 - Polaris

@omkarshinde If you have 100 columns then are you planning to create 50 comparison fields and re-order dynamically? If yes then that also possible, one thing is that you need to make sure that the comparison column ends with the actual column name eg: ID, Right_ID, Comparison_ID

omkarshinde
8 - Asteroid

yes if there are 100 fields I am looking to add 50 flag columns for them right beside each pair. Can this be done via multi field tool? Or i need to make changes in your macro? 

binuacs
21 - Polaris

Macro is to re-order the fields, what kind of comparison are you planning to implement on each set of fields, are you excepting the comparison fields are also created dynamically or you will create manually using formula tool?

omkarshinde
8 - Asteroid

for string fields i would like to compare if lD is present in Right ID or no
and for numeric fields if Right ID >= ID or no
I am looking to make this dynamic if possible instead of having to create 50 comparison columns manually

binuacs
21 - Polaris

that is going to be a lots of work needs to be done in the workflow, because dynamically pick the fields based on the data type and create another field is bit tricky

flying008
15 - Aurora

Hi, @omkarshinde 

 

An Full Dynamic solution for automatic join and add compare multiple fields for calculation. FYI .

 

录制_2024_10_19_09_44_39_871.gif

 

 

ps: I can not upload any .yxmd file to here, so please try it yourself with the above workflow and gif.

 

 Left Input     Right Input       
IDStateLocCategoryJob IDStateLocCategoryJob    
123ab5 1.52.53.5abc5.5    
12345          
               
 Output             
IDRight_IDComparison IDStateRight_StateComparison StateLocRight_LocComparison LocCategoryRight_CategoryComparison CategoryJobRight_JobComparison Job
11.5-122.5-133.5-1ababc-155.5-1
1 02 03 04 05 0
omkarshinde
8 - Asteroid

@flying008 
Thanks for the help! Much appreciated! Grateful!
Can you expand please on the cross tab, multi row formula tool, Dynamic replaces, dynamic renames logics?

flying008
15 - Aurora

Hi, @omkarshinde 

 

1- Cross Tab tool to generate complete multi column calculation fields in order.

2- Multi Row Formula tool to generates corresponding formulas for calculation based on field types.
3- Dynamic Replace tool to calculate the results of the comparison column according to the formula above,
4- Dynamic Rename tool to restore the original field column names.

Labels
Top Solution Authors