Alteryx Designer Discussions

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

Different output required based on the condition

ravikumar060987
7 - Meteor

Dear All,

 

I have a situation where I have a large amount of data, approximately 10L rows. Sharing the sample now.

The problem is that I need to extract different output files from Alteryx based on the colour condition.

I understand that I can use the filter tool for each condition to extract one set of data, but if I start using the filter, the workflow will only contain the filter tool because I have so many conditions to extract different sets of data.

 

so please assist me in resolving this problem

 

Input
IDNameColor
1RaviBlue
2KumarBlue
3RajBlue
4AnuBlue
5KarthikBlue
6VinodGreen
7JohnGreen
8MathewGreen
9MageshGreen
10ChackoGreen
11HussainGray
12SandyGray
13BalaGray
14SenthilGray
15MonaGray

 

Output 1
IDNameColor
1RaviBlue
2KumarBlue
3RajBlue
4AnuBlue
5KarthikBlue

 

Output 2
IDNameColor
6VinodGreen
7JohnGreen
8MathewGreen
9MageshGreen
10ChackoGreen

 

Output 3
IDNameColor
11HussainGray
12SandyGray
13BalaGray
14SenthilGray
15MonaGray
3 REPLIES 3
Amol_Telore
11 - Bolide

Hey @ravikumar060987 

 

Are you looking to generate different files for each color. Simplest way to do is append color field to file name in output tool.

Amol_Telore_0-1658942540902.png

 

DataNath
16 - Nebula

Hey @ravikumar060987 - are you trying to output to Excel? If so, I built a macro (link below) that will do this for you - you simply have to select whether you want the outputs as different files or different sheets within the same file. After that, you can select your field to split on (in your case it would be Color) and sit back whilst it runs. If you need any further help let me know. Other outputs I’d imagine you’ll just need to run the filter idea as you say but as a batch macro, proving your list of colours as the control parameter.

 

https://community.alteryx.com/t5/Public-Community-Gallery/Output-to-multiple-Excel-files-or-sheets/t...

ravikumar060987
7 - Meteor

Thank you for the update. 

I don't know - how I forgot this option in Alteryx.

Thank once again.

Labels