Alteryx Designer Desktop Discussions

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

Dynamically Filter data (based on the values coming in a column) into separate outputs

alibink
7 - Meteor

Problem Statement:

Create as many output streams (17) as the no. of distinct values (17 in my example) coming in a particular column without using 17 Filters one of each value. 

 

How the output should look like?

 

Required Output.png

 

What I have tried so far (with no luck):

I have seen some posts where people have suggested to use the output tool to create separate sheets for each type of values coming in a particular column. Also a macro which essentially does the same thing but iterates as many times as distinct values appearing in the column I want to filter on. 

 

To explain the problem statement I am using Sample Superstore data. It has a column called 'Sub-Category' which has 17 distinct values. 

 

Summarise Screenshot.png-------------->Sub-Category Distinct Values.png

 

I can create an excel output with 17 sheets one for each sub-category. 

Test Output.png

But if I want to build 17 downstream workflows, I'll have to read the 17 inputs again which is as good as putting 17 filters as I have created 2 as a sample:

 

Sample Filters.png

 

Alternatively I can create a macro which essentially does the same thing but not exactly what I want. 

 

Macro.png

 

Packaged Workflow Attached.

 

 

15 REPLIES 15
alibink
7 - Meteor

@caltang Yeah its a matter of developing a logic. Once we do that then we can implement it any tool including python. I'll keep working on it to find a solution and post it here if I find something. You do the same :)

 

Thanks for your help though. 

 

 

Yeah packaging the logic in a tool and make it available in the gallery for others to use is good idea. Will do that once we find appropriate and efficient solution. 

 

flying008
14 - Magnetar

Hi, @alibink 


Do you want to implement a dynamic filter function even like list box based on unique values for multiple rows within a specified field column? 

1- Currently, Alteryx has multiple selected filter that only target multiple columns, not multiple rows even if you implement a row based List box with a macro, it is not updated in real-time unless you run the workflow again to obtain the changed data.
2- Of course, you can use Java script to rebuild the GUI interface of macros, as it can achieve functions similar to keyword search, which will greatly facilitate operability when you have too many items.

alibink
7 - Meteor

@flying008 I don't mind the pathway of solution as long as it solves the problem. 

 

Do you want to implement a dynamic filter function even like list box based on unique values for multiple rows within a specified field column? 

[alibk]: Yes it sounds like it. 

 

1- Currently, Alteryx has multiple selected filter that only target multiple columns, not multiple rows even if you implement a row based List box with a macro, it is not updated in real-time unless you run the workflow again to obtain the changed data.

[alibk]: I can live with re-running the script to update the values based on changed data. Can you put an example together?

AndrewDMerrill
13 - Pulsar

Out of curiosity, why do you need 17 different output streams (or one for every distinct sub-category)? Will you be running different logic/workflows on every one?

alibink
7 - Meteor

@AndrewDMerrill  Yes each category goes through a different stream with its own set of business rules and logic. 

AndrewDMerrill
13 - Pulsar

I still don't really understand why you cannot filter since that is in effect exactly what you are doing in order to run 17 different sets of logic (I guess aesthetic reasons), but here is a dynamic workflow that I think meets your requirements. If you need the category column, you'd just need to join it to the sub-category before running through the macro setup.

Main Workflow:

Workflow.png

Packing Macro:

Pack Macro.png

Unpacking Macro:

Unpack Macro.png

Labels