4 Replies Latest reply on Jun 27, 2018 3:32 AM by sree rao

    how to pass quick filter value in url

    suresh pulapalli

      Hello Folks,

       

      We have two dashboards Master and Detail. Master Dashboard has couple of quick filters and a link(i am using url action) to the Detail Dashboard. User will play with the Master Dashboard and then click on the link to the Detail Dashboard. I wanted to pass the user selected quick filter values to Detail Dashboard. how can I pass the quick filter values selected on Master Dashboard to Detail Dashboard in URL? is it possible? if not, do we have any work around solution for this.

       

      Regards,

      Suresh

        • 1. Re: how to pass quick filter value in url
          Matt Lutton

          Not sure if this is what you're after: List of Embed Parameters

           

          Are you familiar with action filters as well? This is a common way to filter from Master to Detail: http://downloads.tableausoftware.com/quickstart/feature-guides/actions_filter.pdf

           

          Cheers

          • 2. Re: how to pass quick filter value in url
            Jim Wahl

            Hi Suresh,

             

            In most cases, Matthew is probably right that it's easier to combine these dashboards in one workbook and use Dashboard Actions to go to the second dashboard.

             

            But there may be performance, security or other reasons for multiple workbooks, and you can use the URL parameters Matthew referenced above to add a filter to a URL action. For example the below URL generates a map of Superstore sales filtered by the category Tables:

            http://public.tableausoftware.com/views/QuickFilterByURL_Target/Target?Category=Tables

             

            You can combined multiple fields on a filter by separating the fields with a comma(no space):

            http://public.tableausoftware.com/views/QuickFilterByURL_Target/Target?Category=Tables,Paper

             

            Within Tableau, you can put a calculated field in the URL action:

            2013-10-15 16-31-10.png

             

            Where the URL in the above dialog box is:

            http://public.tableausoftware.com/views/QuickFilterByURL_Target/Target?Category=<CategoryQuickFilter>

             

            Notice also the URL option to encode data values. This will, for example, convert the spaces and ampersand in  "Chairs & Chairmats" to the escaped URL characters %20 and %26, respectively, to get "Chairs%20%26%20Chairmats".

             

            Allow Multiple Values is also required. It's not clear that this feature is working as intended, since the operation is the same checked or unchecked. By default it identifies multiple values by a comma, which is fine, but then tries to escape them with a \, which doesn't work. By using a comma as an escape character, you get multiple commas between the fields, but this seems to work.

             

            Anyway, generating the list of values for the URL field CategoryQuickFilter requires two table calculations. The first is CategoryQuickFilter Feeder =

            PREVIOUS_VALUE('') + IIF(PREVIOUS_VALUE('')=='', '', ',') + MIN([Category])
            
            

             

            When calculated over all dimensions in the view, this will build a list using the PREVIOUS_VALUE('') function. The '' in the function means that on the first row, where there is no previous value, the function will return an empty string. The IIF adds a comma after the previous value, unless it's the first row. Finally MIN() is used to aggregate the dimension, which is required for table calcs. You could also use MAX() or ATTR(), since there is only one Category per row that the table calc is operating over.

             

            Since the CategoryQuickFilter Feeder will "build" starting with one value on the first row to a complete set of categories on the last row, we want a second table calc to return this last value for all rows: CategoryQuickFilter =

            PREVIOUS_VALUE(LOOKUP([CategoryQuickFilter Feeder], LAST()))
            
            

             

            LOOKUP(..., LAST()) returns the last row in the partition. This formula, however, is evaluated for every row, which is a bit inefficient. PREVIOUS_VALUE() solves that problem by executing the function on the first row only and then returning that value for the remaining rows.

             

            You can find the workbooks and example on Tableau Public here:

            http://public.tableausoftware.com/views/QuickFilterByURL_Source/SourceDashboard#1

             

            You'll notice one problem. One of the categories has a comma: Scissors, Rulers and Trimmers. This comma results in the field being split. I'd probably work around this by changing the name of the field --- click Category > Default Properties > Aliases. But there are other ways.

             

            Jim

            2 of 2 people found this helpful
            • 3. Re: how to pass quick filter value in url
              vishwanath Pendyala

              Hi Jim Wahi

               

              I am in a similar condition and ended up to this link, However I am not able get your functionality work.

               

              I have the user selected values as Product name and need to concatenate them and get as Quick Filter url as shown

               

                

              Product NameQuick filter url
              ColgateColgate,Bell Computer, Hello,This is D
              Bell ComputerColgate,Bell Computer, Hello,This is D
              HelloColgate,Bell Computer, Hello,This is D
              This is DColgate,Bell Computer, Hello,This is D

               

               

              Can you update the link of the workbook or Help me with the calculation.

               

              Thanks

              Vishwa

              • 4. Re: how to pass quick filter value in url
                sree rao

                HI Jim,

                 

                Thanks in advance, I am not able to open any one of the links ,which you provide for reference, could you please provide the permissions for tableau public.

                 

                Thanks

                Sreenivas