3 Replies Latest reply on Aug 18, 2013 11:25 AM by Jim Wahl

    Filtered Fields - Not All of Them

    Yali Pollak



      I have a challenge about filtering fields.

      I want to have 2 columns with "Clicks" and "Pixel". The "Clicks" and "Pixel" are both from the same dimension which its name is "ConversionType".

      I want to filter on the column "Clicks" nothing but on the column "Pixel" I want to filter another dimension named "ActionStatus" and to pick in it "OK". How could I filter on columns from the same dimension 2 different filters?


      Thank you for your replies.

        • 1. Re: Filtered Fields - Not All of Them
          Jim Wahl

          Mostly likely it's possible, but the solution may depend on your goal / visual layout, which I'm a bit fuzzy on.

          Perhaps you cold post a packaged workbook (twbx) file and a screen shot of how you'd like the filters to work.


          Here are a few tips for posting good forum questions:


          • 2. Re: Filtered Fields - Not All of Them
            Yali Pollak

            Thank you for your replyment, I'd try to be clearer.


            In the attached shot I have 2 fields: Click and Approved. They both are from the same dimension which is called ConversionType.

            I want to deploy a filter with the dimension ActionStatus only on field Click, and to leave field Approved without filters. I attached alsao a twbs file with the same question on the coffee chain example, I have 2 market size and I want to deploy on the major market a filter with dimension product line of only beans, and on the small market type not deploying any filter.

            How could I do that?1.PNG.png

            • 3. Re: Re: Filtered Fields - Not All of Them
              Jim Wahl

              Hi Yali,


              Thanks for the addition details and example file. Tableau applies filters at the data source, so when you filter on action status, you're removing those rows from the view.


              There are a couple of workarounds. The easiest is to replace the filter with a parameter. A parameter is just a user-selectable constant. When you setup a parameter with a list of values and show the parameter control in the view it sort of looks like a filter. To make it work like a filter, you need to create a calculated field that checks for the parameter value.


              To setup the parameter, right-click in the left, Data pane and select Create Parameter.

              2013-08-18 21-08-01.png


              To make it work like a filter, you need to create a calculated field. I created a field called Number of records filtered =

              // Filter product line only for major markets

              IF [Market Size] == "Major Market"


                  IF [Product Line Filter] != [Product Line]

                  THEN [Number of Records]


              ELSE [Number of Records] // Return for all other market sizes



              Now you can replace the Number of Records fields with this new field.


              There are a couple of limitations of this approach:

              1. You can't multi-select filter values.
              2. The parameter needs to be manually maintained / updated when the dimension values change.


              These may not be a problem for you, given you want to include or exclude just the "OK" values and the field is likely to stay constant over updates to the data.


              I updated your sample workbook with this technique. (When I saved this, I chose File > Save As > Save as type packaged workbook, which includes the data set and has a twbx extension.) Let me know if you have any questions.