3 Replies Latest reply on Jan 10, 2018 1:48 AM by Norbert Maijoor

    last year comparison based on work days of the current month

    Michael Wedekindt

      Hi Community,


      I stuck in a quite interesting use case.

      Briefly I need to show values based on the work day of the current month compared to the work day of the previous year and same month.

      In my example I compare December 2017 to December 2016 with the work day and holidays of Germany.


      In the attached workbook there is a parameter called today, this simulates the Today() function that I usually use in the report. You can use this to move in time.

      As I mentioned I compare always the the previous work days from today in the current month with the previous year and same month as Month to date.


      E.g. I am on the 2nd Dec. 2017


      In 2017 in Germany the 1st. Dec. 2017 was a work day, as well in 2016. For this case my function work.


      But when I would open the same report on the 4th. Dec. 2017.

      Then I got this result. Because in Germany the 2nd. Dec 2016 was the 2nd work day in this month. In 2017 the 2nd. Dec. was Saturday and not a work day. In detail it starts already on the 3rd Dec.


      On the next day the 5th. Dec. 2017 it looks then okay again.


      It would repeat again on the 10th Dec. 2017 and so on.


      So the goal is to display only the work days for 2016 that I had already in 2017. Work days of 2017 is the base.

      Again on the 4th. is the 2nd work day in 2017 but compared to 2016 I had already 2 work days. So I need only to see the 1 work day on 2016 only.

      It have to be dynamic because I only check the running month starting from yesterday.


      It's quite complex to describe in text. So I hope that my description is quite understanable.


      I attached the twbx for testing and play and the underlying example data in XLS.


      Best regards and thanks in advance!