Alteryx Designer Desktop Discussions

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

How to merge all rows of a column into 1 row?

yashs
6 - Meteoroid

Hi guys!

So I have 1 text file, which I want to input as a single line text itself. I have imported it as a CSV. But this has caused the data to break down into multiple rows, as you can see in the image.

yashs_1-1605791042725.png

 

My aim is to have just 1 row, which has the entire data

<!-- $Id$ --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>

Something of this sort.

 

I have tried using crosstab function to change all the row data to column. But this results in all row data to be the column header, which cannot be merged again! Looks like this:

yashs_0-1605790998507.png

 

Can you help me to either copy the column name into the data too, so I can merge it?

Or could you propose some other method to do it?

7 REPLIES 7
jamielaird
14 - Magnetar

Hi @yashs,

 

You can configure the summarize tool to concatenate all your data without a delimiter (or with a space or line break if you prefer), and that should do the job.

 

Here's an example:

 

jamielaird_0-1605791465680.png

 

yashs
6 - Meteoroid

I have tried this. The issue I faced is that summarize tool can only be applied after the input tool right?

The output of the input tool breaks down the data into multiple rows itself. I have used delimiter /0 in input tool. Yet the data comes in multiple rows

 

Summarize tool applied after this, works on individual row level

 

Have I understood your solution correctly?

atcodedog05
22 - Nova
22 - Nova

Hi @yashs 

 

Here is a workflow for the task.

Output:

atcodedog05_0-1605791495421.png

Workflow:

atcodedog05_1-1605791534884.png

The highlighted box part is where you mention separator.

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

jamielaird
14 - Magnetar

With the data as shown in your screenshot you can concatenate Field1 using the technique I showed.

 

The delimiter \0 will still cause the data to split into rows as far as I know. If you can post some sample data I can take a look.

atcodedog05
22 - Nova
22 - Nova

Hi @yashs 

 

It should combine all it should come as separate.

 

You can use groupby ID to combine as parts.

 

Hope this helps 🙂 

yashs
6 - Meteoroid

I had a look through your workflow! Works perfectly for me. I apologize for the old response, my understanding was different. Thank you so much!

atcodedog05
22 - Nova
22 - Nova

Glad to hear it got sorted out 😀 @yashs 

 

Happy to help 🙂

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any other issues 🙂

Labels