Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table not showing data. variables not showing values? urgent help please


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.

12 Replies
Not applicable
Author

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;

jonas_rezende
Specialist
Specialist

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);

Not applicable
Author

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?