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

Alteryx Designer Desktop Discussions

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

Combine data values into a single cell on the output file

KeelaWilliams
6 - Meteoroid

Does Alteryx have the ability to take data values from an Excel file and combine that data into a single cell in the output Excel file?

 

 

Input Excel file data format:

KeelaWilliams_0-1687460773863.png

 

 

 

Desired output data into a single cell for the output Excel file:

KeelaWilliams_1-1687460827723.png

 

6 REPLIES 6
geraldo
13 - Pulsar

@KeelaWilliams 

 

it has to be a variable string

 

geraldo_0-1687464371893.png

 

Gaurav_Dhama_
9 - Comet

You can use the following steps to get the result.

1. Add the select tool to make sure the column you are intending to use is converted to string.

2. Add record ID, to get the order of the entries. This will ensure that your output is in correct order.

3. Sort them in descending order on recordID.

4. Use a multi row formula to create a new field (string type > size max) with the expression >

[Data1]+";
"+[Row-1:New Field]

Note: I have used Data1 as my filed, you can use your desired column in place of Data1.

 

5. Add Sample tool and select the last 1 row.

6. Your output will be as you expected.

 

Untitled.png

estictrian
5 - Atom

Input data: Use the "Input Data" tool in Alteryx to read the data from your Excel file. Configure the tool to read the necessary columns and rows containing the data values you want to combine.

Data transformation: Depending on the structure of your data, you may need to perform some transformations. For example, you might need to filter rows, sort data, or join multiple data sources together. Use Alteryx's various tools (such as Filter, Sort, Join) to manipulate the data as needed.

Grouping and aggregation: To combine data values into a single cell, you can group your data based on a specific criteria. Use the "Summarize" tool in Alteryx to group the data and aggregate the values within each group. Configure the tool to concatenate the values from the desired column(s) into a single cell using a delimiter of your choice.

Output data: After the grouping and aggregation, use the "Output Data" tool in Alteryx to write the processed data to a new Excel file. Configure the tool to specify the output file format as Excel and choose the desired destination for the output file.

 

 

 

Know More

KeelaWilliams
6 - Meteoroid

I have tried some of the provided solutions and I am not getting the desired output. Here is an example of what I am getting (image provided).

 

I am seeking help to have data that is in separate cells to be combined into one single cell on the output (image is provided with original post).

 

Thanks!

 

 
 

 

geraldo
13 - Pulsar

@KeelaWilliams 

 



you are concatenating in the formulas and also in
summarize tool is a lot.
in the summarize if everything is a string you can concatenate everything there in a single line

 


the output file which should be very strange its format

Gaurav_Dhama_
9 - Comet

From what I can guess, you are getting that error because you no longer have that column. All your columns are renamed with Concat as prefix. Try using that. Also your filter will not work since it is using =, which won’t satisfy any condition due to concatenation.

 

if you want to filter, use it before summarisation tool.

Labels
Top Solution Authors