2 Replies Latest reply on Jun 16, 2016 2:41 PM by Karthik R

    Separate Filter to plot the average line

    Karthik R



      We are trying the build the following dashboard in tableau.


      It should have two features,


      1.  First filter 'Select Stores to compare' lists down all stores. Whatever store user selects, it should appear in the graph. In the given example, user selected 'KFC' and 'McDonalds'.


      2. Then in the next box 'Filters for Average', there are group of filters. Based on this selection, 'Include for Average' box should gets changed. Here whatever store user selects, average of those should get appear in the graph. In the example Average of KFC, McDonalds, Tacos, Wendy should get appear in the graph.




      How to achieve this in tableau. Is there anyone implemented the similar functionality.


      Please share your ideas.



      r karthik

        • 1. Re: Separate Filter to plot the average line
          Will Griffiths

          Hi there Karthik,


          What you need to do is create a parameter to act as the filter on your worksheet and then a separate calculated field to control this parameter.


          I have done an example using "Superstore Sales Training" but you can easily apply this to your worksheet. First of all create a parameter to contain your "Stores", in my example I have used Region as the separate lines.


          Then we must create a calculated field to contain the seperate calculations for the future reference line:


          You can see this calculation will look for the parameter selection and then the Region (Store in your case) and return the Sales. This is what we will use on our reference line value:



          Right click on the parameter and select "Show parameter control" and you will now be able to filter between the reference lines.




          I have attached the packaged workbook and if you have any further questions please ask. Hope this helps!

          • 2. Re: Separate Filter to plot the average line
            Karthik R

            Hey thanks Will for the response. I looked into your solution and referring some other links. Trying to achieve using Table calculations. Will post the updates.