3 Replies Latest reply on Apr 20, 2017 6:02 AM by Sam Drury

    Compare filtered record to others in same category

    Sam Drury

      Hi, I've looked high and low but can't quite crack this - it may not be possible and apologies if not.


      I have a simple data set as follows:




      I want the user to be able to use a filter to select a specific product, but be shown all products within that category, in order to compare.


      So if the user selects "Product 1", then all products in "Category 1" would remain visible.


      In other words, the user would select a specific product, but the worksheet would filter based on category.


      I want to avoid parameters with static values if possible, because in reality I have hundreds of products which change regularly. I would also like to avoid dashboard actions if possible, because I want a single filter or parameter to refresh various sheets displayed on a dashboard with a single selection.


      Attached is sample workbook - using the filter would show all products within category of the filtered value (rather than just one product).




      Any help much appreciated! Thanks!

        • 1. Re: Compare filtered record to others in same category
          John Sobczak

          Through dashboard actions you can create a filter action that is targeted to filter on the category of whatever is selected.

          • 2. Re: Compare filtered record to others in same category
            Sam Drury

            Thanks John, I don't think Dashboard actions can quite achieve what I'm after because I'd like to use a filter so I can get tableau to produce PDFs automatically for every product (as per Automatically print a single dashboard multiple times based on a filter )


            For more context, I am aiming for a "product dashboard" where the user (or server script) selects a single product and the Dashboard shows various worksheets about it, one of which includes a comparison view showing where the product falls within the category. Something a bit like this, but the comparison would show all rows within the category, rather than the single row as it currently does:




            There are three sheets and one filter on the dashboard. The filter applies to all sheets. Updated workbook attached.


            I can't find a way to make Dashboard actions achieve this? Sorry I didn't explain the challenge very well originally.

            • 3. Re: Compare filtered record to others in same category
              Sam Drury

              I've solved it.


              The trick is to duplicate the data source, use that for the filter, and then link the secondary data source on different fields for each worksheet depending on the view you're after.


              That way, for the category comparison view, you can just link category, and not product.


              When filtering, Tableau finds the individual product you've selected, but as the relationship is on category, this is what the filter applies to:




              For views where you wish to view the specific product only, you simply link the product in the secondary data source.




              Attached is solved workbook.

              1 of 1 people found this helpful