8 Replies Latest reply: Oct 6, 2016 5:50 PM by Marco Wedel RSS

    how to get week

    naveen kumar

      HI All,

      i am trying to put days under particular weeks,which is not working .

       

      if(Day='1,2,3,4,5,6,7','Week1',if(Day='8,9,10,11,12,13,14','Week2',if(Day='15,16,17,18,19,20,21','Week3',if(Day='22,23,24,25,26,27,28,29,30,31','Week4')))) as Week

       

      can any one suggestion where it went wrong

       

       

       

       

      qt1:

      Load*,

      Dual(Date(Date,'MMMM') ,Month(Date(Date,'MMM'))) as Month,

      day(Date) as Day,

       

      //'Week' & Week(Date) as Week;

       

      LOAD date#(Date( Date,'MM/DD/YYYY'),'DD/MM/YYYY') as Date,

                quantity

      FROM

      [C:\Users\naveen.kumar.kunuru.DIR\Desktop\date.xlsx]

      (ooxml, embedded labels, table is Sheet1);

       

       

       

       

      load Day,

      if(Day='1,2,3,4,5,6,7','Week1',if(Day='8,9,10,11,12,13,14','Week2',if(Day='15,16,17,18,19,20,21','Week3',if(Day='22,23,24,25,26,27,28,29,30,31','Week4')))) as Week

      Resident qt1;