Alteryx Designer Desktop Discussions

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

Dynamic Column Addition and Row Compression

Adrummon1
5 - Atom

Hello,

 

I have a data set with rows of repeating values I would like to condense to a single row based on the value of a specific column if the values are the same. I've poked around and seen the multi row and iteration macro tools, but I'm not sure if they match exactly what I'm after. Below is an example input and output. If the item number is the same it will move the corresponding values form the following rows to new columns to the right, but there could be any number of actions. Any advise if appreciated!

 

Input:

Item| Action  | Done by| Date Performed |

123 | Moved| User3     | 6/5/2022            |

123 | Moved| User3     | 6/6/2022            |

123 | Moved| User3     | 6/7/2022            |

321 | Moved| User3     | 6/5/2022            |

321 | Moved| User3     | 6/6/2022            |

121 | Moved| User3     | 6/5/2022            |

 

Output:

Item| Action  | Done by| Date Performed |Action  | Done by| Date Performed |Action  | Done by| Date Performed |

123 | Moved| User3     | 6/5/2022            | Moved| User3     | 6/6/2022            | Moved| User3    | 6/7/2022            |

321 | Moved| User3     | 6/5/2022            | Moved| User3     | 6/6/2022            |

121 | Moved| User3     | 6/5/2022            |

 

5 REPLIES 5
SPetrie
13 - Pulsar

I created the input file to test this with, but I think I hit the main parts. I think this should do what you are looking for or at the least get you close to what you are wanting.

SPetrie_1-1657857731929.png

SPetrie_2-1657857803637.png

 

 

 

 

binuacs
21 - Polaris

@Adrummon1 Is your input file is pipe delimited into one line per record or they are coming separate columns?

grazitti_sapna
17 - Castor

@Adrummon1, here is another way of solving this.

grazitti_sapna_0-1657871858586.png

 

I hope that helps!

 

Thanks!

Sapna Gupta
Emmanuel_G
13 - Pulsar

@Adrummon1 ,

 

One very easy way to achieve this.

 

Remember that Alteryx does not allow having two columns with the same names within the same dataset.

 

So you have the choice in this solution to rename them after the split.

Emmanuel_G_0-1657880406745.png

 

Adrummon1
5 - Atom

Thank you for the feedback everyone! I ended up going with Sapna's solution, but all of these appear to do exactly what I needed, and I was able to dissect and figure out why for future use. Really appreciate everyone's time taken to answer!

Labels
Top Solution Authors