Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
narayanaqlik
Creator
Creator

Turnover time workstation calculation is coming wrong.

Hi Qlik Experts, 

 

I am facing one issue in my turnover calculation 

I am giving you one example like we have school there are several classrooms and different Teachers are there 

we need to calculate each room turnover time each day i.e if it the first class in that room no need to calculate any turnover but it is the second class in the same room then need to calculate the Turnover for the same room how much time it will take to start the second class.

In the same way Teacher turnover time for each day i.e if  it is first class for that teacher no need to calculate the TeacherTurnover time , if it is the second class for the same teacher need to calculate the Teacher turnover.

 

Hear are my calculations:

StudentTable:

Load 

ClassDate,

ClassRoomID,

ClassRoomName,

SchedulStartTime,

SchedulEndTime,

ActuallyStartTime,

ActuallyEndTime

From [Student Table];

 

Load 

  If(Min(ActuallyStartTime)=$(minTime), Null(),

  If (Previous(ClassRoomID)=ClassRoomID, If((SchedulStartTime) >=  Previous(SchedulEndTime), 

     If(ActuallyStartTime>=Previous(ActuallyEndTime), Round((ActuallyStartTime-Previous(ActuallyEndTime))*1440),Null())

), Null())

  )

Resident StudentTable order by ClassDate, ClassRoomID, ActuallyStartTime

;

I am getting Values correctly when the ClassRooms loaded in sequence like

Roo1,

Room2,

Room3

or

Room1,

Room1

Room1

The above two cases the turnover is calculated correctly but in below scenario it is coming correctly

 

But The Rooms Loaded like

Exm 2:

Room1,

Room2

Room1

Here in this case first Room1 has scheduled, next Room2 after that again room1 is scheduled 

here it should calculate Room1, Room1 only but it is not calculating, it is  comparing Room2 to Last Room1 then it is not calculating RoomTurnOver .

This is the similar case for TeacherTurnover also.

Hi Experts Could you please suggest how i need to proceed to get same room turnovers only 

 

 

 

 

 

 

 

Labels (1)
0 Replies