1 Reply Latest reply: Sep 24, 2013 9:34 AM by Yavor Atanasov RSS

    Auto generate dates on Qlikview

      Hey guys, I need to create a database with dates directly on Qlikview, from jan/1/2008 until today on Qlikview, and I need it to be created day by day, and month by month. How do I do that????

        • Re: Auto generate dates on Qlikview
          Yavor Atanasov

          try this script:

           

          Dates:

          Load

            Date(Date,'YYYYMMDD') as DateId,

            Date,

            Date - MakeDate(Year(Date),01,01) + 1  AS DayInYear,

            Year(Date) AS Year,

            Month(Date) AS MonthName,

            Month(Date) & ' ' & Year(Date) AS MonthNameYear,

              Ceil(Month(Date)) as Month,

            Week(Date) AS WeekInYear,

            Day(Date) AS DayInMonth,

            WeekDay(Date) AS DayInWeek,

            QuarterName(Date) AS QuarterNameYear,

            SubField(QuarterName(Date),' ',1) AS QuarterName,

            'Q' & Ceil(Month(Date)/3) as Quarter;

          Load

            AddMonths(today(),12) - recno() AS Date

          Autogenerate (AddMonths(today(),12) - MakeDate(2012,01,01));