Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have calendar script as below in qvw.
SortMap:
MAPPING LOAD * INLINE [
Month, MonthSort
Jul, 1
Aug, 2
Sep, 3
Oct, 4
Nov, 5
Dec, 6
Jan, 7
Feb, 8
Mar, 9
Apr, 10
May, 11
Jun, 12
];
Calendar:
LOAD Date as DateEntered,
Date_TS,
Today,
Week,
Year,
Text(Month) as Month,
ApplyMap('SortMap',Text(Month)) as MonthSort,
Day,
WeekDay,
Quarter,
MonthYear,
WeekYear,
CurYTDFlag,
LastYTDFlag,
FiscalYear,
FiscalYearStart,
FiscalWeek,
FiscalWeekSerial,
FiscalQuarter
FROM
[..\QVD\MasterCalendar.qvd]
(qvd);
CurrentFinancialWeek:
LOAD Year,Week,FiscalWeek,FiscalWeekSerial,FiscalYear,FiscalYearStart RESIDENT Calendar WHERE Week=(Week(Today())) and Year=Year(Today())
Order BY Year ASC;
LET curFiscalWeek=Peek('FiscalWeek',0,CurrentFinancialWeek);
LET curFiscalYear=Peek('FiscalYear',0,CurrentFinancialWeek);
LET curWeek=Peek('Week',0,CurrentFinancialWeek);
LET curYear=Peek('Year',0,CurrentFinancialWeek);
LET curFiscalWeekSeq=Peek('FiscalWeekSerial',0,CurrentFinancialWeek);
LET curFiscalYearStart=Peek('FiscalYearStart',0,CurrentFinancialWeek);
DROP TABLE CurrentFinancialWeek;
There are variables in qvw as below
curWeek
curFiscalWeek
curFiscalWeekSeq
curFiscalYearStart
curFiscalYear
curYear
there is pivot table with below dimension and expressions
Dimension : =If(MIXMATCH(Order,'IN','OUT','EXPIRE')=0,Order)
Expression 1: COUNT(DISTINCT{$<Flag={1},Year=,FiscalWeekSerial={$(=(curFiscalWeekSeq)-4)}>}ID)
Expression 2: COUNT(DISTINCT{$<Flag={1},Year=,FiscalWeekSerial={$(=(curFiscalWeekSeq)-3)}>}ID)
Expression 3: COUNT(DISTINCT{$<Flag={1},Year=,FiscalWeekSerial={$(=(curFiscalWeekSeq)-2)}>}ID)
Expression 4: COUNT(DISTINCT{$<Flag={1},Year=,FiscalWeekSerial={$(=(curFiscalWeekSeq)-1)}>}ID)
the table is not showing data. showing empty table. also when I checked the variables in settings the variables are not showing values instead showing blanks.
Can anyone suggest why the pivot table is not showing data. is this because of variables not showing values.
is there any wrong in script?
please suggest me.
Thanks.
Thanks. you mean like this
/*********************************************************************************
//Load Fiscal Calendar
//*********************************************************************************
SortMap:
MAPPING LOAD * INLINE [
Month, MonthSort
Jul, 1
Aug, 2
Sep, 3
Oct, 4
Nov, 5
Dec, 6
Jan, 7
Feb, 8
Mar, 9
Apr, 10
May, 11
Jun, 12
];
Calendar:
LOAD Date as DateLogged,
Date_TS,
Today,
Week,
Year,
Text(Month) as Month,
ApplyMap('SortMap',Text(Month)) as MonthSort,
Day,
WeekDay,
Quarter,
MonthYear,
WeekYear,
CurYTDFlag,
LastYTDFlag,
FiscalYear,
FiscalYearStart,
FiscalWeek,
FiscalWeekSerial,
FiscalQuarter
FROM
[..\QVD\MasterCalendar.qvd]
(qvd);
NoConcatenate
CurrentFinancialWeek:
LOAD Year,Week,FiscalWeek,FiscalWeekSerial,FiscalYear,FiscalYearStart RESIDENT Calendar WHERE Week=(Week(Today())) and Year=Year(Today())
Order BY Year ASC;
LET curFiscalWeek=Peek('FiscalWeek',0,CurrentFinancialWeek);
LET curFiscalYear=Peek('FiscalYear',0,CurrentFinancialWeek);
LET curWeek=Peek('Week',0,CurrentFinancialWeek);
LET curYear=Peek('Year',0,CurrentFinancialWeek);
LET curFiscalWeekSeq=Peek('FiscalWeekSerial',0,CurrentFinancialWeek);
LET curFiscalYearStart=Peek('FiscalYearStart',0,CurrentFinancialWeek);
Drop Table Calendar;
Attention in word bold.
Calendar:
LOAD Date as DateLogged,
Date_TS,
Today,
Week,
Year,
Text(Month) as Month,
ApplyMap('SortMap',Text(Month)) as MonthSort,
Day,
WeekDay,
Quarter,
MonthYear,
WeekYear,
CurYTDFlag,
LastYTDFlag,
FiscalYear,
FiscalYearStart,
FiscalWeek,
FiscalWeekSerial,
FiscalQuarter
FROM
[..\QVD\MasterCalendar.qvd]
(qvd);
NoConcatenate
CurrentFinancialWeek:
LOAD Year,Week,FiscalWeek,FiscalWeekSerial,FiscalYear,FiscalYearStart RESIDENT Calendar WHERE Week=(Week(Today())) and Year=Year(Today())
Order BY Year ASC;
Drop Table Calendar;
LET curFiscalWeek=Peek('FiscalWeek',0,CurrentFinancialWeek);
LET curFiscalYear=Peek('FiscalYear',0,CurrentFinancialWeek);
LET curWeek=Peek('Week',0,CurrentFinancialWeek);
LET curYear=Peek('Year',0,CurrentFinancialWeek);
LET curFiscalWeekSeq=Peek('FiscalWeekSerial',0,CurrentFinancialWeek);
LET curFiscalYearStart=Peek('FiscalYearStart',0,CurrentFinancialWeek);
Thanks. when I am loading this all sheet tables are showing empty. no data is populating in to qvw.
please help me do I need to change anything more here?