2 Replies Latest reply on Mar 22, 2018 10:11 AM by James Marshall-Wilkinson

    From and To Dates - How to cater for weekends?

    James Marshall-Wilkinson

      Hello Everyone,


      I'm fairly new to Tableau and this is my first post on the forums. I'm hoping that you can help me with an issue I just cannot get my head around. I've included a packaged workbook with some sample data and I'll go on to explain the issue.


      I've been asked to develop training agenda's for several hundred people to attend training on different dates, global locations etc. I was given the start date of the training and the number of hours training for each day of the course.


      A course varies in length, but the days are always contiguous, excluding weekends - and therein lies my problem. I can work out how to get a record for each day within the training for each person using a date file, but I am struggling to 'shift' the days so that there are only records on weekdays.


      A simplified example:


      Day 1, 2018-03-22, Thursday: OK

      Day 2, 2018-03-23, Friday: OK

      Day 3, 2018-03-24, Saturday: Weekend date, needs to be shifted to the next working day, 2018-03-26

      Day 4, 2018-03-25, Sunday: Weekend date, needs to be shifted to the next available working day, 2018-03-27

      Day 5, 2018-03-26, Monday: OK, but the above days have already been shifted to here and now this is 'taken', move to next available day 2018-03-28.


      and so on and so on.


      In the simplified example of the workbook, the training starts on a Sunday - but in fact, training can start on any day of the week and last for a range of periods and therefore a fixed addition to days is not possible.


      There may be a very simple solution - but I've struggled with this one for the best part of a day. Please let me know if I have not been able to explain this very well. Any help or thoughts would be gratefully received - I'm using 10.5.2


      All the Best,