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

Align rows of data

JimFreeman
5 - Atom

Hi,

 

I have an issue where I have a number of inputs coming into a "Join Multiple" based on Record Position. The problem being some of the inputs, the record will have 4 or 3, and other inputs will be 2 and 3. When joining this way, there is a mismatch in the rows of data as shown below. eg Park 2 is on same row as Park 1 under "Track".

 

I want to have the highlighted cells moved down to align with the correct "track" name.

 

The data set is quite large so not able to join by "specific Fields" (I don't think) using the Join Multiple.

 

Have included a data sample which shows current and desired output.

 

Thanks for the help

 Align.jpg

7 REPLIES 7
CoG
14 - Magnetar

One way is to use an iterative macro, where all the data is in the macro and joined after being filtered by [Track]. Not really ideal, but it gets the job done.

Macro Workflow.png

gawa
16 - Nebula
16 - Nebula

hi @JimFreeman 

I suggest to review your Multiple Join way. Before connecting Multiple Join, it is better to put tile number for each "Track" by Tile tool.

Then, Multiple Join by "Track" and "Tile number". Output by doing this would look like your desired one. Please refer to attached WF.

image.png

flying008
15 - Aurora

Hi, @JimFreeman 

 

How many types in your filed [Track] ?  Now 2 in your sample data, but about most ?

JimFreeman
5 - Atom

Hi, there would be between 10 to 15 different types. 

PangHC
13 - Pulsar

when I saw 8~files, I happier to use directory + macro


logic similar to @gawa. join by [Track] and [Tile_SequenceNum]

 

Load first file and add tile, 

use directory to get files, remove the first file (workflow)

Load each file, and add tiles, join with first file and repeat (macro)

 

note: plan to use join to do the filter but the filename get from input tool is missing extension 😒, no choice to use 3 tools to do same things. 

Screenshot 2023-11-17 174730.png

(filter + count + append + count) to check whether still have more files. if no, output the result.

Screenshot 2023-11-17 174741.png

 

flying008
15 - Aurora

Hi, @JimFreeman 

 

Maybe there is always a better way for this case:  [If you can upload more data for test, this method will be robust.]

 

录制_2023_11_18_11_49_10_919.gif

 

000.png

JimFreeman
5 - Atom

Thanks Gawa, this has fixed my issue, was just needing a tile in there!

Labels
Top Solution Authors