2 Replies Latest reply: Nov 27, 2015 7:16 AM by Beatriz Manjón RSS

    53 Weeks in the Year grouped in periods of 4 weeks

    Beatriz Manjón

      Hello all,

       

      I have a doubt about how group weeks in periods. Lets explain myself: I have grouped the weeks into periods of 4 weeks. ( A year has 13 periods of 4 weeks) The problem comes when I realized that this year, has 53 weeks instead of 52 and the last week, that is the week nº53 has to be included in the period number 13.


      The actual formuIa I am using to get the periods of 4 weeks is the next one:


      Week(DATETABLE) as Week,

            ceil(Week (DATETABLE)/ 4)as Period,

       

      But with that formula, the week number 53 is included in a 14thperiod and what I want is to included in the 13thperiod.

       

      Could someone help me with this?

       

      Many thanks!