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

Line break and text to column

Aryan1182114
6 - Meteoroid

Hi team

I will do my best to explain this but in case you are unable to follow, please see the input and output files for reference.

 

Input file column A provides the serial number, Column B provides the strength of students in a particular class (contains data with line break) and column C provides the subject name for the respective class students in that serial number.

 

This data needs to be converted as follows:

The subject should be the column headers and the strength of the students should be reflected within the subject in each row i.e. for every serial number the number of rows will increase based on classes in that serial number.

 

Also, please let me know how to resolve the line break issue in Alteryx.

 

Thanks

4 REPLIES 4
DavidP
17 - Castor
17 - Castor

Here's how I would do it. Sample workflow attached.

 

DavidP_0-1595369347823.png

 

grazitti_sapna
17 - Castor

Hi @Aryan1182114 , please refer to the workflow if this is what you are looking for?

Thanks.

grazitti_sapna_0-1595394607185.png

 

Sapna Gupta
Aryan1182114
6 - Meteoroid

Thanks @DavidP this worked perfectly.

One more questions, when we use summarize tool, it there a way to keep the other columns as is. Like we have column 'rows' here and we grouped the value with it; however, in my actual data i have multiple columns which i want to keep. Should i use 'group by' there as well.

DavidP
17 - Castor
17 - Castor

Yes, group by is one option, as long as the additional grouping doesn't change the row structure of the rest of your data.

 

Probably a better way is to have something like a RecordID before the summarize tool and only include the fields required in the summarize tool as well as the RecordID, then join the summarized data back to the original data with a join tool using the RecordID.

Labels