Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!

Dynamic Filter Macro

5 - Atom



I am trying to create a macro where a user can upload a file with the following fields (Field, operand, Operator, OutputBranch, OutputField)

and it will filter another file based on the data in the previous file. 


Essentially, I am trying to create a dynamic filter where a user can simply upload a file with the filter criteria in it. 


Is this possible in Alteryx?


I have uploaded a sample data file, and a sample filter file. The filter would also need to handle more complicated operators, such as contains and not equal to, and things like that.  


Thank you!

14 - Magnetar


Depending on how well you can train users on syntax or control the file upload, the CReW macros have a really powerful Dynamic Formula tool.


You could essentially configure an input into this, and then add something eg: IF (Your user formula) Then 1 Else 0 ENDIF and then set up a filter with something like [FilterCriteria] = 1


If you still want more control than this, you could probably use the ideas in the Dynamic Formula tool to build a Filter tool to accomplish this

13 - Pulsar

Take a look at the attached and see if this gets you there.  The trickiest part was the operator.  I couldn't think of a good way to implement, so I ended up using a switch statement in a Formula tool and running through the possibilities.


Hope it gets you closer!

5 - Atom

Thank you so much! That was super helpful and got me really close to what I needed!