Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Interface to allow user to select 1-N years to pass through a filter.

hellyars
13 - Pulsar

How would you setup an interface tool to update a filter (on Year) that allows a user to select 1-N years to pass through the filter?  ([Year] is not a date; it refers to a fiscal period.

 

 

 

 

 

[Year] in ("2011","2010","","")

 

 

 

 

 

YEAR
2009
2010
2011
2012
2013
5 REPLIES 5
AkimasaKajitani
17 - Castor
17 - Castor

Hi @hellyars 

 

I show the sample of using the DropDown tool.

 

AkimasaKajitani_0-1621651096492.png

When we use the Interface tools, basically we set the Action tool to rewrite the parameter of the tools. 

 

Action tool setting is as follows when we use the Basic filer.

 

AkimasaKajitani_2-1621651401073.png

 

Filter setting is as follows.

 

AkimasaKajitani_3-1621651523323.png

 

 

Please refer attached sample workflow.

 

 

danilang
19 - Altair
19 - Altair

Hi @hellyars 

 

To select multiple years, use a List Box/Filter combination

danilang_1-1621681829375.png

 

Configure the filter using the "IN" syntax, [Year] in (2009).  Configure the List box to output a csv list with no quotes  

danilang_4-1621682104547.png

 

And finally set the Action tool to Replace a specific string with 2009 being the target

danilang_3-1621682013832.png

 

The criteria gets replaced with the user selected values when run

   

danilang_0-1621681670057.png

 

Dan

 

atcodedog05
22 - Nova
22 - Nova

Hi @hellyars 

 

If you are looking to show a filter based on range 1-N years. You can design your analytic app like below. Where you can use 2 dropdown list to set lower & upper value of the range and use its respective filters to change the values like.

atcodedog05_1-1621683591273.png

 

Output:

atcodedog05_2-1621683693045.png

 

Hope this helps 🙂

atcodedog05
22 - Nova
22 - Nova

Hi @hellyars 

 

And here is a neat trick if you are interested. Lets say you do not want to update the value in dropdown tool configuration with new options (below config) each time data is updated. Lets say you want the options to dynamically update.

atcodedog05_0-1621684004267.png

 

Here is the trick. Drop down & List box tool has this option where you can pass field names from previous tools as display options. What you can do is take the column which has values, use formula tool to create a dummy column, use crosstab tool to convert values into column name like below. And then pass it to drop down tool as field names input. Now this will dynamically update the options each time data is updated.

atcodedog05_1-1621684530124.png

Hope this helps 🙂

hellyars
13 - Pulsar

@danilang  That's exactly what I needed. 

@atcodedog05  Thank you.  This is setup for a range (vs. a random selection), but I have use for this.

@AkimasaKajitani  Thank you as well.  I was looking for a way to define a range, but I can learn from this.

 

Thank you all.

Labels