6 Replies Latest reply on Oct 26, 2018 6:52 AM by Jared Byrd

    Filter help

    Jared Byrd

      New to Tableau, and I'm trying to filter our employees that are flagged by a dimension called Description(Note Type). The issue is that this field has multiple descriptions in use. Case in point, I have an employee that has a Description(Note Type) = Employee and a  Description(Note Type) = ENOTES when I filter for Employee, the record still shows in the data sheet because he has the other Description(Note Type) = ENOTES present. However I can't filter out ENOTES because other records would be filtered out that need to be on my report. Help. I need a way to not show the record on the report if Description(Note Type) = Employee is present.

        • 1. Re: Filter help
          Michel Caissie

          Jared,

           

          You can compute a boolean   isEmployee  which will return true if the employee have at least one row with the Description = Employee

           

          {FIXED [yourEmployeeDimension]:  MAX(if [Description] = 'Employee' then 1 else 0 end)} = 1

           

          So for every row  , if the description is 'Employee'  then flag a 1,  then for each employee, if the MAX of this flag for all the rows of this employee equals 1, then this employee have at least 1 row with Description=Employee.

          And  this calculation will return True on all rows of this employee, because it is a level of detail calculation {},  group by Employee .

           

          By putting this calculation on the filter and keeping the  False values, you will filter out every row of this employee including all other  Note Types.

           

          Michel

          1 of 1 people found this helpful
          • 2. Re: Filter help
            Jared Byrd

            Thanks Michel,

             

            I created the calculated field as you instructed, and added as the filter keeping on the false values, however it still shows the Employee records on the report.

            • 3. Re: Filter help
              Michel Caissie

              Then I will need  a package workbook  (.twbx)  to troubleshoot.

              If the data is sensitive you can mockup  a similar scenario using the  Superstore file that comes with  Tableau.

              • 4. Re: Filter help
                Jared Byrd

                Here is a quick example attached. Suppose Ship Mode was the Employee Flag and since there are several different Ship modes, I want exclude all Customers that have used First class before how would I do that using the information I originally posted.

                • 5. Re: Filter help
                  Michel Caissie

                  like this ?

                  • 6. Re: Filter help
                    Jared Byrd

                    Genius! Thanks for your help. I was able to see what I did wrong when I input your original instructions.