Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

aravind_dussani
New 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
Valued Contributor

Re: Master Calendar "Field 'a' not found" Error

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

7 Replies

Re: Master Calendar "Field 'a' not found" Error

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

Re: Master Calendar "Field 'a' not found" Error

Which field is that?

Life is so rich, and we need to respect to the life !!!
Chanty4u
Esteemed Contributor III

Re: Master Calendar "Field 'a' not found" Error

share your source file

luismadriz
Valued Contributor

Re: Master Calendar "Field 'a' not found" Error

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
Valued Contributor

Re: Master Calendar "Field 'a' not found" Error

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

Untitled.png

aravind_dussani
New Contributor II

Re: Master Calendar "Field 'a' not found" Error

@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
New Contributor II

Re: Master Calendar "Field 'a' not found" Error

thanks all those responded to this post..

Community Browser