Alteryx Designer Desktop Discussions

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

Split column into different outputs

JoaoFernandes
7 - Meteor

Hi friends,

 

I have to do a basic task on Alteryx but I'm having doubts about it. I have a file that looks like this:

 

Student IDScore
SSS112
SSS114
SSS116
SSS113
SSS214
SSS214
SSS315
SSS320
SSS311

 

My intetion is to split this table into different outputs (without exporting) everytime the "student ID" changes. So for every "student ID", I want to create a table. The output should look like this:

 

Table 1

Student IDScore
SSS112
SSS114
SSS116
SSS113

 

Table 2

Student IDScore
SSS214
SSS214

 

Table 3

Student IDScore
SSS315
SSS320
SSS311

 

Etc.

 

Unfortunately I can't use the filter tool because I never know exactly which ID's I have, nor how many. Does anybody know how to? Thank you very much.

6 REPLIES 6
AmeliaG
Alteryx
Alteryx

Hi @JoaoFernandes,

 

Thanks for your question! Within the output data tool, there is an option to 'Take file or table name from field'. In this instance, you should select that option and the field you would use would be the 'Student ID' field. This knowledge base article details how to set it up. 

 

The output will change depending on your file type. If you are using Excel, it will create a separate sheet for each student. If using CSV, it would create a separate file for each student. 

 

Let me know if you have any additional questions and I'd be happy to help!


Amelia

JoaoFernandes
7 - Meteor

Hi Amelia G,

 

thanks for your answer! Unfortunately I know about that option but I can't use it since I don't want to export the data right away, I just want to produce an individual table per "Student ID". Do you know if I should use a Multi Row Formula?

 

Thanks again for your help!

AmeliaG
Alteryx
Alteryx

Hi @JoaoFernandes,

 

It sounds like you need to either:

1. Use the 'Group By' function in a given tool, to group by the student id. 

2. Create a batch macro where your 'Control Parameter' is the student id. This is essentially a 'Group By' for the entire process within the macro. Meaning, take the records for each student id separately and run them through this process. Here is a great training video to get you started with batch macros. 

 

In Alteryx you don't need to actually create separate tables in order for the data to be treated like separate tables in the process. The only time you would actually break out the data is upon output. 

 

What are you trying to do with your data after it is grouped?

JoaoFernandes
7 - Meteor

HI AmeliaG

 

I'm trying to divide into different tables because I want to create a unique ID for each student. If I use the Record ID tool, I will get something like this:

 

Student IDScoreRecord ID
SSS1121
SSS1142
SSS1163
SSS1134
SSS2145
SSS2146
SSS3157
SSS3208
SSS3119

 

But I would like something like this:

 

Student IDScoreRecord ID
SSS1121
SSS1142
SSS1163
SSS1134
SSS2141
SSS2142
SSS3151
SSS3202
SSS3113

 

So I figured the best way to do this is by spliting into different tables. I will try the macro solution, thanks!

AmeliaG
Alteryx
Alteryx

Hi @JoaoFernandes,

 

Thanks for that explanation! There are two ways you can achieve your desired results:

 

1. Using the 'Multi-Row Formula' tool and leveraging the 'Group By' function to 'Group By' Student ID

2. Use the Tile tool and tile on 'Unique Value'

 

I've attached a workflow which show both methods.  

 

Have a great day!


Amelia

JoaoFernandes
7 - Meteor

Those workflows work great! Thanks AmeliaG!

Labels