Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have to create master calendar with default dates because I don't have the date field.
My Min date will be = 01/03/2018 (DD/MM/YYYY)
and
My max date will be = Today()-1
Please guide how can I achieve this.
Thanks in advance.
Try like:
Let vMinDate=Num(MakeDate(2018,3,1));
Let vMaxDate= Num(Today()-1);
Load
Date($(vMinDate)+RowNo()-1) as Date,
Month($(vMinDate)+RowNo()-1) as Month,
Year($(vMinDate)+RowNo()-1) as Year
AutoGenerate $(vMaxDate)-$(vMinDate)+1;
Edit: corrected the min date
Try like:
Let vMinDate=Num(MakeDate(2018,3,1));
Let vMaxDate= Num(Today()-1);
Load
Date($(vMinDate)+RowNo()-1) as Date,
Month($(vMinDate)+RowNo()-1) as Month,
Year($(vMinDate)+RowNo()-1) as Year
AutoGenerate $(vMaxDate)-$(vMinDate)+1;
Edit: corrected the min date
Hi Deepaksingh,
Use the following. @MK_QSL had solved this before. I've edited a bit for you.
MinMaxDate:
Load
Floor(Date('08/12/2005','DD/MM/YYYY')) as MinDate,
Floor(Today()-1) as MaxDate
AutoGenerate 1;
Let vMinDate = NUM(PEEK('MinDate',0,'MinMaxDate'));
Let vMaxDate = NUM(PEEK('MaxDate',0,'MinMaxDate'));
Calendar:
Load
Date(DateNum) as Date,
Month(DateNum) as Month,
Year(DateNum) as Year;
Year(DateNum) as Year;
Load
$(vMinDate) + IterNo() - 1 as DateNum
AutoGenerate 1
While $(vMinDate) + IterNo() - 1 <= $(vMaxDate);
Jordy
Climber
Thank you all for your immediate response and suggestions.