Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
aravind_dussani
Contributor II
Contributor II

Master Calendar "Field 'a' not found" Error

Hi Community people. I tried to create a master calendar in Qlikview. But i'm getting an error as "Field 'a' not found" when i reload. have a look at my script which i mentioned below.and suggest me corrections.

OrderHeader:

LOAD OrderDate,

     OrderID,

     ProductID,

     Quantity,

     Sales,

     Discount,

     CostOfSales,

     GrossProfit,

     DeliveryDate

FROM

(ooxml, embedded labels, table is Sheet1);

MinMaxDates:

LOAD

min(OrderDate) as minDate,

max(OrderDate) as maxDate

Resident OrderHeader;

Let vMinDate = Num(Peek(‘minDate’,0,’MinMaxDates’));

Let vMaxDate = Num(Peek(‘maxDate’,0,’MinMaxDates’));

DROP table MinMaxDates;

DateRanges:

Load

$(vMinDate) + IterNo()-1 as DateNum,

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

Autogenerate 1 while $(vMinDate) + IterNo()-1 <= $(vMaxDate);

MasterCalender:

load TempDate as OrderDate,

Day(TempDate) as Master.Day,

Week(TempDate) as Master.Week,

Month(TempDate) as Master.Month,

'Q'& Ceil( Month(TempDate)/3) as Master.Quarter,

Year(TempDate) as Master.Year

Resident DateRanges order by TempDate asc;

DROP table DateRanges;

1 Solution

Accepted Solutions
luismadriz
Specialist
Specialist

Hi,

The only problem I could see was the apostrophes here:

Let vMinDate = Num(Peek(‘minDate’,0,’MinMaxDates’));

Let vMaxDate = Num(Peek(‘maxDate’,0,’MinMaxDates’));

Change it to this:

Let vMinDate = Num(Peek('minDate',0,'MinMaxDates'));

Let vMaxDate = Num(Peek('maxDate',0,'MinMaxDates'));

I hope this helps,

Cheers,

Luis

View solution in original post

7 Replies
sunny_talwar

Would you be able to post a screenshot of the error message?

Anil_Babu_Samineni

Which field is that?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Chanty4u
MVP
MVP

share your source file

luismadriz
Specialist
Specialist

Hi,

The only problem I could see was the apostrophes here:

Let vMinDate = Num(Peek(‘minDate’,0,’MinMaxDates’));

Let vMaxDate = Num(Peek(‘maxDate’,0,’MinMaxDates’));

Change it to this:

Let vMinDate = Num(Peek('minDate',0,'MinMaxDates'));

Let vMaxDate = Num(Peek('maxDate',0,'MinMaxDates'));

I hope this helps,

Cheers,

Luis

luismadriz
Specialist
Specialist

Red one is the one you're using, black one is a good one:

Untitled.png

aravind_dussani
Contributor II
Contributor II
Author

@Luis Madriz :: very thanks for ur support.

i changed script according to your suggestion . there is apostrophes problem in my script. n finally got master calender output.

aravind_dussani
Contributor II
Contributor II
Author

thanks all those responded to this post..