Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Time issue

Good day,

a company is open from 07:00 to 13:00 and trucks deliver goods only between these times

So there is a column Total Time spent, which is the total time a truck spent @ the company, even if it was closed.

The column Actual time spent must show the time that the truck spent @ the company between 07:00 and 13:00

Thus

Truck one, actual time spent should be 02:00 which is good,

Truck two, actual time spent should be 02:00 (09:00 minus 07:00 (open time))

Truck three, actual time should be 03:00 (10:00 minus 07:00 (open time))

Please see attached

Labels (1)
6 Replies
Not applicable
Author

Hi,

Please Find the attached file . Hope it will helps you

CELAMBARASAN
Partner - Champion
Partner - Champion

May be attached file might helps

Not applicable
Author

Hi,

This is helpful, but what happens if the truck arrives at 12:30 PM, and departs at 13:30 PM,

Then the answer will be 13:30 - 07:00 = 6:30, but it should be 30 minutes.

Regards

Not applicable
Author

Hi,

I like the expression, its a little complicated though.

The answer for the last one should be 03:00 though, is that possible?

Regards

jagan
Partner - Champion III
Partner - Champion III

Hi,

PFA for solution.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

Please see attached under new discussion called time issue 1, I added some more data to the model you sent me, but its still incorrect. I also added a column with the correct answers.

Regards