Start Free Trial

Alteryx Designer Desktop Discussions

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

Filter rows based on values in a column

hemant86
11 - Bolide

HI Team,

 

I have the below requirement. I need split rows into multiple output based values of a column. I want to split based on values in Entity column. But I do not want to use the filter tool. Is there any other alternative.

 

Appreciate any help around this.

 

Input:

EntityValue
A1111
A2222
B3333
B4444
B5555
C6666
C7777
C8888

 

3 Outputs :

EntityValue
A1111
A

2222

 

B3333
B4444
B5555

 

C6666
C7777
C8888

 

I do not want to use filter because the filter values in Entity column might change so do not want to hard code it.

7 REPLIES 7
caltang
17 - Castor
17 - Castor

You could use a Batch Macro to cycle through the Entity list.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
gawa
16 - Nebula
16 - Nebula

hi @hemant86 This is one way by using Python tool. Python tool allows max 5 outputs so that is the limit of # of unique value of 'Entity'.

image.png

hemant86
11 - Bolide

Thanks @gawa . This is great. But I will be needing output more than 5 as well.

caltang
17 - Castor
17 - Castor

What are you trying to do with the data? If you can tell the story, we can give better suggestions - I believe the batch macro can package the calculations and ETL logic you need + can go through each entity as shown above. Unless each entity has a different calculation... in which case your ETL will need to be dynamic.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
hemant86
11 - Bolide

Hi @caltang All the calculation are being taken care before filtering the data based on entity. I'm just trying to produce separate output file filtering the data based on entity. This is the final step in workflow. 

gawa
16 - Nebula
16 - Nebula

@hemant86 If you want to output to separate file based on value of Entity, use option "Take File/Table Name From Field" in Output tool. You can change filename in Formula tool based on your criteria.

Or, as @caltang said, Batch Macro is also good option to be considered. It totally depends on what you want to do.

image.png

Qiu
21 - Polaris
21 - Polaris

@hemant86 
What do you mean by "Output"?
If you are going to output to Excel files, we can provide the fullpath for each row, then use the option in Excel out "Take File/Table Name from Field".

2024-03-01 170109.png

Labels
Top Solution Authors