Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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????
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));
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));