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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Comapare dates in set analysis

Hi

I am trying to use set analysis to get the difference from two dates in an set analysis

My case is that I have many routes on any given date.

I need to compare routes ready on floor agianst loading to truck.

The table would look something like

Route
DateTo_FloorTo_rampTo_Truck
1232013.04.122013.04.12 09:00:002013.04.12 09:07:002013.04.12 09:12:00
1232013.05.122013.04.12 08:31:002013.04.12 08:40:002013.04.12 08:45:00
1252013.04.122013.04.12 09:10:002013.04.12 09:14:002013.04.12 09:21:00
1272013.04.122013.04.12 07:00:002013.04.12 07:03:002013.04.12 07:23:00
1232013.06.122013.04.12 19:00:002013.04.12 19:05:002013.04.12 19:19:00






My goal is to build a table where I compare the time between to_floor ->to_ramp and  to_ramp ->to_truck

Giving something like

RouteDateFloortimeLoadtimeTotalleadtime
1232013.04.1207:0005:0012:00
1232013.05.1209:0005:0014:00
1252013.04.1204:0007:0011:00

My initial idea was:

sum(

          {$<

               Category = {'to_ramp'}

           >}

          Date

)

-

sum(

          {$<

               Category = {'to_floor'}

          >}

          Date

)

But we can have situatiions where one route runs two or more times a day. The formua above would then give the sum for that day. I need to be able to evauate each route.

Any comments?

BR

DJ

Labels (1)
1 Reply
Not applicable
Author

Use:

Expression between floor and ramp

=Interval(Toflor-ToRamp, 'mm') //gives you difference in minutes - you could also yse 'hh:mm'

Expression between ramp and truck

=Interval(ToRamp-ToTruck, 'mm')

Define 3 variables:

let ToFlor = num(timestamp#('YOURCOULMN','YYYY/MM/DD  hh:mm:ss TT'));

let ToRamp= num(timestamp#('YOURCOULMN','YYYY/MM/DD  hh:mm:ss TT'));

let ToTruck= num(timestamp#('YOURCOULMN','YYYY/MM/DD  hh:mm:ss TT'));