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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Run Times

Hi I need to find a way of calculating the journey time of a run from ASW to NIS. This is a simple calculation:

(ActDepTime ASW) - (ActArrTime NIS)  but there are a number of different services and I need to do multiple calcuations on the same set of data (one calculation for each service). In this example there are three services  01-02-050-07, 01-02-050-08 & 01-02-050-09. Im new to this.. Any ideas anyone?

ServiceIDStopActArrTimeActDepTime
01-02-050-07ASW06:01:5806:02:48
01-02-050-07ASM06:05:3606:06:22
01-02-050-07AUD06:08:1806:10:15
01-02-050-07DYL06:12:1806:13:21
01-02-050-07CER06:14:4106:15:35
01-02-050-07EDL06:16:5006:17:43
01-02-050-07CLA06:19:4006:20:33
01-02-050-07VEL06:22:5106:23:35
01-02-050-07SPC06:24:5806:25:32
01-02-050-07HOT06:26:4006:27:18
01-02-050-07NIS06:28:3606:29:27
01-02-050-08ASW06:14:3406:15:09
01-02-050-08ASM06:17:3006:17:50
01-02-050-08AUD06:19:3506:21:17
01-02-050-08DYL06:23:1906:24:36
01-02-050-08CER06:26:1206:27:09
01-02-050-08EDL06:28:4506:29:37
01-02-050-08CLA06:31:3506:32:23
01-02-050-08VEL06:34:1306:35:02
01-02-050-08SPC06:36:2706:37:05
01-02-050-08HOT06:38:1506:38:52
01-02-050-08NIS06:40:1906:41:01
01-02-050-09ASW06:26:3606:27:18
01-02-050-09ASM06:29:3106:30:13
01-02-050-09AUD06:31:5906:34:20
01-02-050-09DYL06:36:1606:37:14
01-02-050-09CER06:38:2906:39:12
01-02-050-09EDL06:40:1806:40:58
01-02-050-09CLA06:42:3606:43:22
01-02-050-09VEL06:45:1306:46:15
01-02-050-09SPC06:47:5606:48:34
01-02-050-09HOT06:50:0406:50:54
01-02-050-09NIS06:52:0806:52:51
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Glenn,

The attached shows a chart that looks like yours. I've shown two ways to create  the dimension.

1. Calculated Dimension. This will work fine for a small amount of values.

2. New field "ASW Depart" created in the script. Recommended option.

If you need to transpose all the different stops into separate columns you can do that with GENERIC LOAD.

Qlikview Notes: Use cases for Generic Load

-Rob

http://masterssummit.com

http://robwunderlich.com

View solution in original post

7 Replies
jvitantonio
Specialist III
Specialist III

Hi,

Please find the solution in the attached app.

I hope it helps.

JV

BI Experience | A place to share our Business Intelligence experiences

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

See attached. I've loaded the data and then created a chart with ServiceId as Dimension and Expressions:

=only({<Stop={ASW}>} ActDepTime)

=only({<Stop={NIS}>} ActArrTime)

And then another column subtracting the two.

-Rob

Not applicable
Author

Ashton jny.jpg

Rob thanks for the help.. I really am new to this, for some reason I cant open the QVW you sent but our IT is on to it..

In the meantime is there another way you could suggest to output the data in my original query in the format of the chart above with Journy time on the Y axis and the Departure time from ASW on the X axis.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Are you using QV Personal Edition or a licensed version?

-Rob

Not applicable
Author

licenced edition... Ive sorted the access issue. just cant get it to look like the chart above

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Glenn,

The attached shows a chart that looks like yours. I've shown two ways to create  the dimension.

1. Calculated Dimension. This will work fine for a small amount of values.

2. New field "ASW Depart" created in the script. Recommended option.

If you need to transpose all the different stops into separate columns you can do that with GENERIC LOAD.

Qlikview Notes: Use cases for Generic Load

-Rob

http://masterssummit.com

http://robwunderlich.com

Not applicable
Author

Thanks Rob