Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Combine column with first row of data to create new column

Chirag_Gandhi07
8 - Asteroid

Is it possible in Alteryx Designer to be able to combine columns with the first row of data? So if my first column is LastName, and in the first rwo, the data contains Smith. How can I have it so that the column now displays LastName ; Smith instead of just LastName? I have attached a screenshot of what I am trying to do. Any help would be greatly appreciated. 

 

Thank you

13 REPLIES 13
Inactive User
Not applicable

Hi Chirag,

 

Good question! If I understand your question correctly, it's fairly easily done using the multi-field formula tool. I've attached an example of how to do that.

 

BR

danrh
13 - Pulsar

You could look at using Transpose to get the column names and values side by side, use a Formula to combine the two, and then a Dynamic Rename back to your original data. Something like:

image.png

The first record gets sent to the bottom stream, the rest go through the top stream. Take a look, see if it helps.

Chirag_Gandhi07
8 - Asteroid

@danrhThanks for your solution. The problem is that I have 120 columns and I only want to join the column name with the first row for about 80 of those columns. When I tried your solution, the columns wouldn't take the first row data. Not sure why.

danrh
13 - Pulsar

Can you add sample data for the full dataset? Ideal would be what it looks like before and what you need it to look like afterwards.

Chirag_Gandhi07
8 - Asteroid

@danrhI have attached a screenshot of some sample data. So what I would like is to have the columns Q1, Q2. Q3, and Q4 combined with the data on row 1. So for example the column with Q1 will be Q1 ; Do you have software? and so on with the other three questions. But, I would like the other columns to stay the same. So LastName would just stay as LastName. Is it possible to do this?

danrh
13 - Pulsar

It looks like the data is shifted for the question columns - i.e. the first respondent's answers are on the second row, the second respondent's are on the third row, etc. Is this correct? If so, what about the Email, Status, RespondentEmail, and DistributionChannel fields? Can you provide a screenshot of what the data should look like after it has been corrected?

Chirag_Gandhi07
8 - Asteroid
 
Chirag_Gandhi07
8 - Asteroid
 
Chirag_Gandhi07
8 - Asteroid

@danrhI was able to get it to work the way I want it but I am now facing another issue. For example: The column should now display: Q3 ; Please confirm whether or not you have software installed? However, it displays: Q3 ; Please confirm wheth. Is this a character limit issue and if so, do you know how to resolve it?

Labels