Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
See this blog post: Creating Reference Dates for Intervals
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,
HTH,
PFA,
Hirish
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)