Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
let vmindate=num(peek(OrderDate,0,Orders));
let vmaxdate=num(peek(OrderDate,-1,Orders));
tempcalendar:
load
date($(vmindate)+RowNo()-1) as tempdate ------ I AM GETTING ERROR HERE SEE ATTACHMENT FOR ERROR COPY
AutoGenerate
$(vmaxdate)-$(vmindate)+1;
mc:
load
tempdate as OrderDate,
week(tempdate) as week,
Year(tempdate) as OrderYear,
month(tempdate) as month,
day(tempdate) as day
resident tempcalendar;
Variables are not getting assigned with values. Try including single quotes aroung table and field names like:
let vmindate=num(peek('OrderDate',0,'Orders'));
let vmaxdate=num(peek('OrderDate',-1,'Orders'));
Hope try using
date($(vmindate)+(RowNo()-1)) as tempdate
Hi Manoj,
Try like this
CalendarMaster:
LOAD
Date(InvoiceDate) AS InvoiceDate,
Year(InvoiceDate) AS Year,
'Q' & Ceil(Month(InvoiceDate) / 3) AS Quarter,
Month(InvoiceDate) As Month,
Day(InvoiceDate) As Day,
Week(InvoiceDate) As Week;
Load Date(MinDate + IterNo() -1 ) AS InvoiceDate While (MinDate + IterNo() - 1) <= Num(MaxDate);
Load
Min(InvoiceDate) AS MinDate,
Max(InvoiceDate) AS MaxDate
RESIDENT Invoice;
Hope this helps others in generating the Master Calendar.
Regards,
Jagan.