Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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,
Hi Nina
Do you have the rest of the script as it looks like its not finding your table Bagtall
Thanks
Dan
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.
I also see the tables in the Data manager, as well as all data - except the calendar - is showing in my app.
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.
What is the order of these tables in the script? I hope you have loading Bagtall before your calendar?
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.
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 🙂
where is solution ? can you help me in this
it was showing table error