Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

How to turn long data into wide format with record ID

overhead_press
8 - Asteroid

I have the following data set and I am trying to convert from a long to wide format like what is shown in the desired results. Idea is that every two rows with a value in the name column followed immediately after with a row that is blank in the name column belongs to the same group. Another criteria is that the ID is only one off of the other. For example ID 8 is not included in the final results, because it does not belong to the group with ID 3 and 4 because the difference between 3 and 8 is greater than 1.

 

Thanks in advance! 

 

Sample:

 

IDnametext
1Bobby Bobabc
2 cdf
3Robby Robert
4 azx
8 zxc
50Tracy Smithxvg
51 hve

 

Desired result (only the first 3 columns matters, the ID columns are for demonstration purposes): 

Nametext text1ID ID2
Bobby Bobabccdf12
Robby Robertazx34
Tracy Smithxvghve5051
2 REPLIES 2
DataNath
17 - Castor
17 - Castor

EDIT: Apologies, misread the brief! Amended flow attached:

 

If you don't care about ID as you say then you can obviously just remove these with the select tool.

 

DataNath_0-1653417588237.png

 

 

 

DataNath
17 - Castor
17 - Castor

Alternative method that is dynamic to more than 2 'Text' entries per person:

 

DataNath_0-1653418448688.png

 

Labels