Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
krmvacar
Creator II
Creator II

Master Calendar dublicate date period

Hi All,

I have a calendar table and a table where I get working hours. I need to show working hours hourly. I calculated the periods but when I connect the calendar table it multiplies for each working minute. Can you help me with the table?

My request here is to show only the periods in a day and null the periods that do not exist. Because I also need to show the time periods when I do not work.

 

 


LET vMinDate = Num(MakeDate(2024,4,1));

LET vMaxDate = Num(Today());

LET vDays = vMaxDate - vMinDate + 2;


Calendar:
load
Date(Floor(TimeStamp)) AS Date,

Dual(Time(Floor(Frac(TimeStamp),'00:60:00'),'hh:mm')&'-'&Time(Floor(Frac(TimeStamp),'00:60:00')+'00:60:00','hh:mm'),Floor(Frac(TimeStamp),'00:60:00')) as PeriyodNew;

LOAD Date(Floor(TimeStamp)) AS Date,

TimeStamp,

Hour(TimeStamp) AS Hour,

Minute(TimeStamp) AS Minute;

LOAD

Timestamp($(vMinDate) + (RecNo() - 1)/1440) as TimeStamp

AUTOGENERATE 1440 * $(vDays);

Table :

LOAD
date(floor(StartTime),'YYYY-MM-DD') as StartTime,
date(floor(EndTime),'YYYY-MM-DD') as EndTime,
EndTime as EndTimeOrj,
date(floor(EndTime)) as Date,
StartTime as StartTimeorj,

FROM [lib://.....qvd] (qvd);

krmvacar_0-1725048107053.png

 

Best Regards

Labels (1)
0 Replies