12 Replies Latest reply on Feb 13, 2014 3:48 PM by Jonathan Drummey

    Count the number of leave days taken by weekday

    David Bartolo

      Hello,

       

      I am trying to solve a problem and thught I might leverage the Tableau community for help.

       

      I have some HR data that indicates a leave start date and a leave end date. I can calculate the number of days leave using datediff easily enough but I want to total the numbr of leave days by day of week. For instance I begin leave on Wednesday and return the following Thursday.  In my report I need columns to indicate working days (Monday through Friday) and a measure to indicate number of days leave for each. So in th example above Friday, Monday and Tuesday would inidcate 1 each and Wednesday and Thursday would indicate 2.

      I cannot think of a calculation to  the number of times leave occured for each weekday. Just to add complexity, I will be reporting on these monthly so if leave crosses into next month I only want to report the total of weekdays days for this month and I will report the rest next month.