Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error while generating days between start date and End date

Hi Guru's,

i have script like this

LET Start = num(makedate(2008,1,1));

let End=num((Asof);

LET NumOfDays = End - Start + 1;

Date_src:

LOAD

  $(Start) + RowNo() - 1 AS DateNum

  ,Date($(Start) + RowNo() - 1) AS Date

AUTOGENERATE 1 

WHILE $(Start)+IterNo()-1<= $(End); 

start date is 2008 Manually entered.

End date is coming from excel data .

iam geeting error as attached

please find the sample application

How to solve this

any help would be greately appreciated

thanks in advance

13 Replies
Anonymous
Not applicable
Author

Hi Raj,

Please Maybe try as below:

LET End=num(Date#(Asof));

Regards

Neetha

Not applicable
Author

Hi Sunny,Neetha ,

No luck

thanks for your time

actually that Asof Field is coming as a field value of Job posting Title Field

here is the asource Excel file

MarcoWedel

Hi,

another solution could be:

tabCalendar:

LOAD *,

    Day(Date) as Day,

    WeekDay(Date) as WeekDay,

    Week(Date) as Week,

    WeekName(Date) as WeekName,

    Month(Date) as Month,

    MonthName(Date) as MonthName,

    Dual('Q'&Ceil(Month(Date)/3),Ceil(Month(Date)/3)) as Quarter,

    QuarterName(Date) as QuarterName,

    Year(Date) as Year,

    WeekYear(Date) as WeekYear;  

LOAD Date(MinDate+IterNo()-1) as Date

While MinDate+IterNo()-1 <= MaxDate;

LOAD MakeDate(2008,1,1) as MinDate,

    Max(Asof) as MaxDate

Resident Res;

hope this helps

regards

Marco

Not applicable
Author

Thanks all