1 Reply Latest reply on Oct 7, 2016 4:08 AM by Carl Slifer

    Filtering 1 dimension while keeping all of another

    Ryan Bottoms



      Struggled with naming this question, so hopefully it wasn't too misleading.


      I have two data sources joined together, the first has a Date (e.g. June 1, 2016) and the standard number of hours an employee is supposed to work on that day (e.g. 8). The second source has my actuals - the date (my join clause), the persons name and the actual number of hours worked. I want to build a table that has the date down the side (rows) and then a column for the standard plan and the column for the actuals. That part is easy but I want to be able to filter to an individual and still see all the hours they should have worked (the standard plan). The problem I am running into is our capture system does not include data for days not worked, so it isn't in the file - so if I filter to only see Employee A and they didn't work on June 1st then I don't see June 1 | 8.0 | 0.0 (date | standard hours | actual hours)


      How would you approach this?

        • 1. Re: Filtering 1 dimension while keeping all of another
          Carl Slifer

          Howdy Ryan,


          The best way would probably be to fix this in the database by creating a table that has all the extra dates. You can do this with a database + tally table and create additional dates as needed per person. I've shown a simple comparison using three sheets in tableau. One of these is where you join scheduled onto actual hours. One of these is actual hours joined to scheduled and the final one has all the dates (master) and actuals and scheduled are both joined onto it.


          Best Regards,

          Carl Slifer