Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Need suggestions on how to merge rows with same values in Alteryx

Nazwa
5 - Atom

Hi Everyone,

 

Could anyone give me suggestions on how to merge 2 or more cells/ rows with same value in a clumn, just like the excel function "Merge and Center"? I would like to merge all cells of column A with same values, but column B will remain as is, basically an Alteryx alternative to Excel's "Merge and Center" tool. Would really appreciate your help

 

Column AColumn B
5/12/2021Apple
5/12/2021Banana
5/12/2021Apple
5/13/2021Orange
5/13/2021Orange
5/13/2021Orange
5 REPLIES 5
Christina_H
14 - Magnetar

Assuming this is a requirement for an output, the best way I know is to use nested tables to create the merged cells.  Create a table of just your fruits grouped by date, then a second table showing both date and the previous table.

Christina_Hurrell_0-1636544508044.png

 

HomesickSurfer
12 - Quasar

Hi @Nazwa 

 

Consider use of the Summary tool with ColumnA grouped, and; ColumnB concatenated with a newline separator.

If this works for you, please Like, Share and/or Accept as Solution.  Thx.

 

Capture.PNG

Nazwa
5 - Atom

Thanks @ Christina_H for the solution. I actually wanted an alternative to the Table tool as I need to export the output to an excel that would have the Date column with merged cell (similar to the one in the question). Do you have any suggestions for achieving that? Really appreciate your help!

 

 
Nazwa
5 - Atom

Thanks @ HomesickSurfer for the solution. But I had some more numeric columns after the Fruits column, which has now lost it's fruit wise segregation. Is there a way to only merge the Date column and keep all the other columns segregated in rows/unmerged, like the example in the question? Thanks again for your help!

 

Christina_H
14 - Magnetar

@Nazwa if you render the nested tables into Excel it does actually come out with merged cells. You might have trouble getting the headings to come out correctly though. I totally understand if it isn't the right solution for you!

Labels