Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Im having attached data set with Date selection in my Dashboard. Need to create a column called continuos absent .
Ex:-
(when particular employee absent continuously for 2 days it count as 2 .
If he present to work on next day that count should be zero .
Next day again he absent need to count as 1.
(This need to add continuously when he absent until he present to work)
Please help me on this.
data:
load * inline [employee, date, absent_fl1, 9/1/2021, 11, 9/2/2021, 01, 9/3/2021, 12, 9/1/2021, 12, 9/2/2021, 12, 9/3/2021, 13, 9/1/2021, 03, 9/2/2021, 13, 9/3/2021, 1];
data2:
load *,if(peek(employee) = employee, if(absent_fl=1, peek(absent_continuous) +1, 0), absent_fl) as absent_continuousresident dataorder by employee, date asc;
drop table data;
exit script;