5 Replies Latest reply on Oct 31, 2016 7:53 AM by Carl Slifer

    Edit filter using a parameter

    Chuan Yu



      I am very new to Tableau so I am not familiar with some of the functionality of Tableau. I am trying to use Tableau to work on my current project. Basically, we are looking at how R&D expenditures change over time so we have the variable "Year" in columns and "RD_expenditures" in rows. We also want to see how individual firms behave over time so I have dragged the variable conm, which is company name, in color so I see the R&D expenditures for each firm over time.


      My question here is that I want create a parameter to filter the companies appear in my chart. So I have created a parameter "Stability 3yr" and what I want to achieve is that when I drag the parameter "stability 3yr", the firms showing up in my chart will change based on their value of "stability3" in my dataset (of course the parameter "stability 3yr" is created from the variable "stability3"). I have tried to apply the parameter in a filter for the variable "conm" but it did not work out when I put in the formula [stability3]=[stability 3yr].


      I don't know how to solve this issue. Does anyone have any idea how to make this work? It seems like a quite easy task but I have been struggling with this for quite a while...


      I would really appreciate your help if you could guide me through how to solve this issue.


      Many thanks in advance!


      Tableau query.png

        • 1. Re: Edit filter using a parameter
          Luciano Vasconcelos

          It's easy as you said.

          You create a calculation:


          [stability3]=[stability 3yr]


          Drag on filter card and set to true.

          • 2. Re: Edit filter using a parameter
            Chuan Yu

            Hi Luciano,


            That's what I thought too and as I said, I have already tried this formula but it did not work. When I create the calculation and set the value to "True". My whole chart just disappears... Not sure why this is the case.


            An idea?

            Many thanks!


            • 3. Re: Edit filter using a parameter
              Chuan Yu

              I have also tried to use 'conm' as a filter and use the parameter on that filter as below... did not work either...


              I would really appreciate your help on this issue.


              Thank you very much!Untitled1.png

              • 4. Re: Edit filter using a parameter
                Carl Slifer



                I'm going to go out on a limb here and guess that you do not have any stability that are equal exactly 218.1587xxxxx

                I'm assuming now that when you created your parameter you have data type float instead of integer. If this is a value that's something like 218 or 222 you might want to use integer as your data type and then select a step range bottom of the create/edit parameter dialogue box.  If you do not have all values. If there are holes as in, no 219 or 220 or 221 but a 218 and 222 you may just consider using a list instead of a range of values.


                Finally you might just need a filter here. If you want look at a single value just use the field Stability3 as a filter. Using the parameter + colouring is valuable for seeing how one compares to the others but its messy and overdoing it if you want to use the parameter to select a single value to apply a filter on.


                Best Regards,

                Carl Slifer


                • 5. Re: Edit filter using a parameter
                  Carl Slifer

                  1) Simply drag your conm field onto the filters shelf.

                  2) Choose Show All (for now)

                  3) Right Click the Field while its on the filters shelf and select show


                  4) In the Top Right of your sheet it should appear. In the top right of the

                  filter there is a drop down arrow click it.

                  5) Choose single value dropdown as how you want the user to interact with

                  the filter.


                  If you want the user to see all the conms and to see just one in a red

                  colour and the rest as a grey (to show how it compares)

                  1) Create a Parameter

                  2) Choose String as your Data type

                  3) Choose list

                  4) Choose add from field (option the right) - select the Conm Field

                  5) Create a calculated field (Conm =  )

                  6) Use that field on the colours shelf.

                  7) Right click the parameter (bottom left corner) and select show parameter