Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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;
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
Would you be able to post a screenshot of the error message?
Which field is that?
share your source file
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
Red one is the one you're using, black one is a good one:
@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.
thanks all those responded to this post..