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: 
Anonymous
Not applicable

Start date and end date

Hi

i have a dataset shown below

EMployee.   Startdate.     Enddate

abc.               01/04/2016.      04/04/2016

cde.               01/04/2016.      05/04/2016

fgh.               03/04/2016.       07/04/2016

ijk.                 03/04/2016.                        

lmn.               04/04/2016.      07/04/2016

so my dimension will be date

ouput what im want is

date.             Value

01/04/2016.      2.  ( two item start date)

02/04/2016.     2.  

03/04/2016.     4.   (Two item start date)

04/04/2016.     4.  (One start and 1 end date)

05/04/2016.     3

06/04/2016.     3

07/04/2016.     1

08/04/2016.      1

the count should get accumulate till it reached end date

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See this blog post: Creating Reference Dates for Intervals


talk is cheap, supply exceeds demand
HirisH_V7
Master
Master

Hi,

check this,

Data:

LOAD *,

Enddate as Date

INLINE [

    EMployee, Startdate, Enddate

    abc, 01/04/2016, 04/04/2016

    cde, 01/04/2016, 05/04/2016

    fgh, 03/04/2016, 07/04/2016

    ijk, 03/04/2016

    lmn, 04/04/2016, 07/04/2016

];

LOAD * ,

Startdate as Date

INLINE [

    EMployee, Startdate, Enddate

    abc, 01/04/2016, 04/04/2016

    cde, 01/04/2016, 05/04/2016

    fgh, 03/04/2016, 07/04/2016

    ijk, 03/04/2016

    lmn, 04/04/2016, 07/04/2016

];

Then is this your'e required output,

Start  Date and End Date Summation -212451.PNG

HTH,

PFA,

Hirish

HirisH
Kushal_Chawda

Data:

LOAD Employee,

            Date(StartDate+iterno()-1) as Date,

            StartDate,

            EndDate

FROM Table

while StartDate+iterno()-1 <= EndDate;

Create the Straight table

Dimension:

Date

Expression:

Count( distinct Employee)