关于Qlik Sense 的日历表

LET MinDate = Num(MakeDate(2013,1,1));
LET MaxDate = Num(Today()-1);


temp_DateField:
LOAD
$(MinDate) + rowno() -1 as Num,
date($(MinDate) + rowno() -1 ) as TempDate
AUTOGENERATE $(MaxDate) - $(MinDate)+1;


//OrderDate Calendar
Calendar:
LOAD
TempDate as "Date",
// TempDate as Date_Applied,
// Week(TempDate) AS OrderWeek,
Year(TempDate) as "Year",
Num(Month(TempDate)) as "Month",
// Month(TempDate)&'.'&Year(TempDate) as MonthYear,
Year(TempDate)&'-'&num(Month(TempDate),00) as YearMonth,
num(Year(TempDate)&num(Month(TempDate),00)) as YearMonth2,
Day(TempDate) as "Day"
Resident temp_DateField
ORDER BY TempDate ASC;
DROP TABLE temp_DateField;

posted @ 2018-04-27 15:22  VinceS  阅读(514)  评论(0编辑  收藏  举报