Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

Not applicable

How to segregate two continuous date into daily date

Hi guys, I am new and having trouble when trying to execute this report. I got one excel file that have table as below,


StartDateEndDateTypeOfLeave
01/03/201501/03/2015Planned Leave
06/04/201508/04/2015Planned Leave
11/04/201512/04/2015Unplanned Leave

and I want to segregate the startDate and EndDate into daily (Line by Line) like shown below,

StartDateEndDateTypeOfLeave
01/03/201501/03/2015Planned Leave
06/04/201506/04/2015Planned Leave
07/04/201507/04/2015Planned Leave
08/04/201508/04/2015Planned Leave
11/04/201511/04/2015Unplanned Leave
12/04/201512/04/2015Unplanned Leave

Please help me out because its very urgent.

regards,

Azieda

3 Replies

Re: How to segregate two continuous date into daily date

Try this:

Table:

LOAD Date(StartDate + IterNo() - 1) as StartDate,

  Date(StartDate + IterNo() - 1) as EndDate,

  TypeOfLeave

While StartDate + IterNo() - 1 <= EndDate;

LOAD StartDate,

     EndDate,

     TypeOfLeave

FROM

[https://community.qlik.com/thread/207762]

(html, codepage is 1252, embedded labels, table is @1);


Capture.PNG

Not applicable

Re: How to segregate two continuous date into daily date

Hi Sunny,
Appreciated your reply. i try your code n succeed but somehow the result/date continues generate until year 9999. I just want the date display depends on existing file.

its look like this:

Re: How to segregate two continuous date into daily date

May be the max date in your database is 9999 or something is mis-specified to be the year 9999. Would you be able to check your date?

Community Browser