2 Replies Latest reply: Jul 10, 2015 7:49 AM by Federico Velasco RSS

    Calendar Question

    Federico Velasco

      Hi all,

       

      I have a question here.

      I make a master calendar which works fine.

      But I need to change some days from a week to other week.

       

      In this year Q1 ends in week 14 with 30 and 31, but I have to change this two days to week 13.

      Is it posible?

       

      The actual solution is a excel this dates, but I want to do it in script.

       

      Thanks.

        • Re: Calendar Question
          balkumar chandel

          In preceding load you can use if

           

          load  *,

          if  (Qtr=Q1 and month = ...and date=....... ,13,Week as week

           

          its just a example .

           

          Thanks

          BKC

          • Re: Calendar Question
            Federico Velasco

            Hi Again,

             

            I had try this:

             

            Calendar:

            LOAD

              Date,

              Week,

              WWeek,

              Month,

              Quarter,

              Year,

              Day,

              YearMonth,

              Period_id

            Resident CalendarTMP

            Where Week(QuarterEnd(Date)) > Week;

             

            Concatenate

            LOAD

              Date,

              Week-1 as "Week",

              WWeek,

              Month,

              Quarter,

              Year,

              Day,

              YearMonth,

              Period_id

            Resident CalendarTMP

            Where Week(QuarterEnd(Date)) = Week;

            DROP Table CalendarTMP;

             

            Where CalendarTMP comes from Master Calendar.

            What dou you think?