Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Sales:
LOAD OrderID,
ProductID,
Product,
CustomerID,
EmployeeID,
OrderDate,
Margin,
Sales,
Cost,
Quantity
FROM
C:\Users\PITCHAIAH\Desktop\Sales.xls
(biff, embedded labels, table is [Orders$]);
Sales1:
LOAD *
Resident Sales
Order By OrderDate;
DROP Table Sales;
LET vMinDate=Num(Peek('OrderDate',0,Sales1);
LET vMaxDate=Num(Peek('OrderDate',-1,'Sales1');
You are missing closing ')' and single quotes in the first
LET vMinDate=Num(Peek('OrderDate',0,'Sales1'));
LET vMaxDate=Num(Peek('OrderDate',-1,'Sales1'));
But do you want a date instead ? just checking...
LET vMinDate=Date(Peek('OrderDate',0,'Sales1'));
LET vMaxDate=Date(Peek('OrderDate',-1,'Sales1'));
after closing the ')'.still i did not get them
Hi Raja,
You're using a "load * resident" which is causing an auto-concatenation of Sales1 in Sales.
Sales1 is not actually created and cannot be referenced in the peek function.
Simply add a "NoConcatenate" before loading Sales1 and it will work.
Thank You
i got an error from this code .date($(varMinDate) + rowno() – 1) As TempDate
TempCalendar:
Load
date($(vMinDate) + rowno() – 1) As TempDate
Autogenerate
$(vMaxDate) – $(vMinDate) + 1;
Please solve the issue
you said the error was : date($(varMinDate) + rowno() – 1) As TempDate
but the code says: date($(vMinDate) + rowno() – 1) As TempDate
varMinDate <> vMinDate
Did you post the wrong error or code ? Can you post your whole script ?
Sales:
LOAD OrderID,
ProductID,
Product,
CustomerID,
EmployeeID,
OrderDate,
Margin,
Sales,
Cost,
Quantity
FROM
C:\Users\PITCHAIAH\Desktop\Sales.xls
(biff, embedded labels, table is [Orders$]);
NoConcatenate
Sales1:
LOAD *
Resident Sales
Order By OrderDate;
DROP Table Sales;
LET vMinDate=Num(Peek('OrderDate',0,Sales1));
LET vMaxDate=Num(Peek('OrderDate',-1,'Sales1'));
TempCalendar:
Load
date($(vMinDate) + rowno() – 1) As TempDate
Autogenerate
$(vMaxDate) – $(vMinDate) + 1;
i noticed you never added the single quotes (around Sales1) i mentioned in vMinDate definition. Can you try that ?
LET vMinDate=Num(Peek('OrderDate',0,'Sales1'));
LET vMaxDate=Num(Peek('OrderDate',-1,'Sales1'));