Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

nina_jensen
New Contributor III

Master Calendar - Table not found

Hi,

I am new to Qlik Sense and using v3.0.

I am trying to create a Master Calendar based on the video Creating A Master Calendar

However I am getting some errors and I have tried to search for solutions, but so far I haven't been able to solve this.

I get the following errormessage:

Started loading data

QuartersMap << AUTOGENERATE(12)

Lines fetched: 12

The following error occurred:

Table not found

The error occurred here:

Temp:

Load min(DateID) as minDate,

max(DateID) as maxDate

Resident Bagtall

Data has not been loaded. Please correct the error and try loading again.

DateID is my date field in the table (xlsx file with date format)

The table were the date field is located is called Bagtall

QuartersMap: 

MAPPING LOAD  

rowno() as Month, 

'Q' & Ceil (rowno()/3) as Quarter 

AUTOGENERATE (12); 

     

Temp: 

Load 

min(DateID) as minDate, 

max(DateID) as maxDate 

Resident Bagtall; 

     

Let varMinDate = Num(Peek('minDate', 0, 'Temp')); 

Let varMaxDate = Num(Peek('maxDate', 0, 'Temp')); 

DROP Table Temp; 

     

TempCalendar: 

LOAD 

$(varMinDate) + Iterno()-1 As Num, 

Date($(varMinDate) + IterNo() - 1) as TempDate 

AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate); 

     

MasterCalendar: 

Load 

  TempDate AS DateID, 

  week(TempDate) As Week, 

  Year(TempDate) As Year, 

  Month(TempDate) As Month, 

  Day(TempDate) As Day, 

  ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter, 

  Week(weekstart(TempDate)) & '-' & WeekYear(TempDate) as WeekYear, 

  WeekDay(TempDate) as WeekDay 

Resident TempCalendar 

Order By TempDate ASC; 

Drop Table TempCalendar; 

Hope someone is able to help me solve this

1 Solution

Accepted Solutions
oknotsen
Honored Contributor III

Re: Master Calendar - Table not found

My guess is the sheets with the script are in the wrong order. Probably have the auto generated script below the part with the Calendar.

May you live in interesting times!
7 Replies
oknotsen
Honored Contributor III

Re: Master Calendar - Table not found

The error clearly states table Bagtall is not found, so I would double check if you are 100% sure that is the name of the table (case sensitive) and if that table was loaded before you reference it in this part of the script.

For quarter I would not bother with creating the mapping table but instead use this:

'Q' & CEIL(Month(TempDate)/3) AS Quarter,

Also note that your WeekYear is going wrong in week 52, 53 and 1, so I would use this script instead:

Week(TempDate) &'-' &

If(Week(TempDate)=1 AND Month(TempDate)=12,Year(TempDate)+1,

If(Match( Week(TempDate), 52, 53) AND Month(TempDate)=1, Year(TempDate)-1,

Year(TempDate))) AS WeekYear,

May you live in interesting times!
danansell42
Contributor III

Re: Master Calendar - Table not found

Hi Nina

Do you have the rest of the script as it looks like its not finding your table Bagtall

Thanks

Dan

nina_jensen
New Contributor III

Re: Master Calendar - Table not found

Hi Daniel,

I have loaded the tables via the Data Manager and created the Master Calendar script in the Data Load editor.

In the Data editor there is only the calendar, Main and the Auto Generated section, which are the tables from the Data Manager. If I display the Auto Generated section, to me it looks like the table is loaded.  If I try to unlock the Auto Generated section I am told that I will not be able to edit the data selection with Data manager.

Since I'm not to familiar with scripting (as you probably guessed already ) I am a little unsure if I should unlock the section.

bagtall.JPG

I also see the tables in the Data manager, as well as all data - except the calendar - is showing in my app.

nina_jensen
New Contributor III

Re: Master Calendar - Table not found

Hi Onno,

Thank you for the tip - I will correct my calendar.

As for the table not found, please see my answer to Daniel below.

Re: Master Calendar - Table not found

What is the order of these tables in the script? I hope you have loading Bagtall before your calendar?

oknotsen
Honored Contributor III

Re: Master Calendar - Table not found

My guess is the sheets with the script are in the wrong order. Probably have the auto generated script below the part with the Calendar.

May you live in interesting times!
nina_jensen
New Contributor III

Re: Master Calendar - Table not found

The Auto Generated script were below the Calendar. When I switch order everything loaded correctly.

Thank you for taking your time to help a novice :-)

Community Browser