2 Replies Latest reply on Sep 1, 2017 1:04 PM by Colleen Guyre

    Filter dependent on filter action

    Colleen Guyre

      I have a data set where each line item is either an A or B [field 1]. The default setting for my dashboard shows calculations  for  A & B aggregated, but the user can click on A or B to filter for just that data.

       

      I have two fields, lets call them R & C that can each be a value or blank and are independent of each other (both can be blank, one can be blank, or neither can be blank) for each line item. When the dashboard is showing both A & B, I would like to filter R and C such that R can be anything but C is only including blanks. When the dashboard is showing either A or B only, I would like to filter R and C such that C an be anything but R is only including blanks. I tried to make calculated fields:

       

      [field 3] = IF {FIXED: [field 2]} = 1 THEN [R] ELSE [C] END

       

      where

       

      [field 2] = IF AVG([field 1]) = 1 OR AVG([field1]) = 2 THEN 1 END

       

      Note: A = 1 and B = 2 (A & B are aliases)

       

      I then moved [field 3] to the filters shelf and checked only the option for blanks. [field 1] is being filtered by the action on the dashboard. It obviously didn't work.

       

      Is what I want to do even possible?

       

      Edit: I have attached a packaged workbook with example data

        • 1. Re: Filter dependent on filter action
          Rahul Upadhye

          Hi,

          Pls share your expected results? What do you want to achieve finally?

           

          rahul

          • 2. Re: Filter dependent on filter action
            Colleen Guyre

            The dashboard I am creating will eventually be accessible on a tableau server to all the employees in my company. The value, represented in my example as the sum of the customers, is actually an important company metric. The values I want to display need to be filtered as I specified above in order to be correct. I cannot share the actual data and the actual metrics are quite complicated to calculate. I was able to figure out how to calculate them save for this filtering issue, but I simplified the example to only provide relevant information.

             

            Edit: as I stated in the question: "When the dashboard is showing both A & B, I would like to filter R and C such that R can be anything but C is only including blanks. When the dashboard is showing either A or B only, I would like to filter R and C such that C an be anything but R is only including blanks."