2 Replies Latest reply on Jan 19, 2017 2:57 PM by Yuriy Fal

    Use Action Filter to show all orders that contain the selected products

    Stefan Zehr

      Hello Tableau-Community

       

      I have a dashboard with 2 sheets:

       

       

      Left side: order basket with revenue.

      Right side: the sum of revenue aggregated by product number

       

      What I want: via action filter: click on the product number (right side) --> left side should only show orders containing the selected product (but also every other product in these orders)

       

      Problem: right side does not contain order number and I see no way to add it. Setting an action filter results in the following:

       

       

       

      On the left side it shows only the selected products. What I would like to see is this:

       

       

      Is there any way to build such a action filter?

       

      Best regards

      Stefan

        • 1. Re: Use Action Filter to show all orders that contain the selected products
          Sagar Sanjay Joshi

          Hi Stephan,

                    Action Filters use the fields that are used in the view to pass the filter criteria onto the destination sheets. Since you don't have Order number on the right sheet, it wont know which order number it needs to filter on. In this case you can add the order number field to the sheet on the right. this way, if you click on the product number, the left sheet will be filtered by product number, and if you click on Order number, it will filter the left view by order number.

           

          Another way to filter would be by using drop down filters for both order and product numbers.

          • 2. Re: Use Action Filter to show all orders that contain the selected products
            Yuriy Fal

            Hi Stefan,

             

            I apologise for late reply.

            It well may be that you've got the solution already.

            If not, I'd like to show the way (the two, actually).

             

            Please find the attached v10.0 workbook with the two dashboards in it.

             

            The first one is based on the so-called "Sheet-as-a-Button" approach (or 1-Button for short).

            It implies a special behaviour from users:

            select Product ID --> click 1-Button -- > get Order IDs.

            un-select (previously selected) 1-Button --> un-select (previously selected) Product ID.

            repeat

             

            The second one is using a Self-Join on the [Order ID] field (or X-Join for short).

            It is more convenient to the user. BUT use with CAUTION:

            to get the correct results in the X-Join Orders target table --

            take SUM([Sales]) for example -- the underlying datasource

            should meet the strict requirement of having no "duplicate"

            (non-unique) Product ID rows for the same Order ID.

             

            This is not the case with the Sample Superstore dataset used here,

            so one could see the results are different when filtering the same Product ID --

            for example the very first one, which has the most Orders -- in both dashboards.

             

             

            Hope this could help a bit.

             

            Yours,

            Yuri