Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
I have a little problem with LOAD Script.
I have a Excel sheet like this:
Date | Hour | Period in Use |
01-02-2012 | 10:39:46 | 0:01:00 |
01-02-2012 | 10:56:22 | 0:01:00 |
01-02-2012 | 11:09:25 | 0:05:30 |
01-02-2012 | 11:13:58 | 0:01:00 |
01-02-2012 | 11:46:00 | 0:01:30 |
01-02-2012 | 11:49:24 | 0:01:30 |
01-02-2012 | 12:12:29 | 0:04:00 |
01-02-2012 | 13:17:02 | 0:05:00 |
01-02-2012 | 13:32:08 | 0:01:00 |
01-02-2012 | 14:17:51 | 0:10:00 |
01-02-2012 | 15:37:34 | 0:04:00 |
01-02-2012 | 16:03:36 | 0:00:00 |
01-02-2012 | 16:08:59 | 0:02:30 |
01-02-2012 | 16:56:14 | 0:02:00 |
And I would like to acumulate the column "Period in Use", but I can´t do it in script!!
I'd tried using the function above in Load Script, but it is not run correctly what I want.
I would like transform that datas in a new table like this:
Date | Hour | Period in Use | Acumulated OK |
01-02-2012 | 10:39:46 | 0:01:00 | 0:01:00 |
01-02-2012 | 10:56:22 | 0:01:00 | 0:02:00 |
01-02-2012 | 11:09:25 | 0:05:30 | 0:07:30 |
01-02-2012 | 11:13:58 | 0:01:00 | 0:08:30 |
01-02-2012 | 11:46:00 | 0:01:30 | 0:10:00 |
01-02-2012 | 11:49:24 | 0:01:30 | 0:11:30 |
01-02-2012 | 12:12:29 | 0:04:00 | 0:15:30 |
01-02-2012 | 13:17:02 | 0:05:00 | 0:20:30 |
01-02-2012 | 13:32:08 | 0:01:00 | 0:21:30 |
01-02-2012 | 14:17:51 | 0:10:00 | 0:31:30 |
01-02-2012 | 15:37:34 | 0:04:00 | 0:35:30 |
01-02-2012 | 16:03:36 | 0:00:00 | 0:35:30 |
01-02-2012 | 16:08:59 | 0:02:30 | 0:38:00 |
01-02-2012 | 16:56:14 | 0:02:00 | 0:40:00 |
Because I need to use the column Acumulate for a Simple Graph Table.
I don´t want to do it on a Graph Bar Table or Graph Pivot...
Have anyone of you a idea?
Thank you so much.
Rodrigo,
try using the peek() function, not above(), like
Acc:
LOAD Date,
Hour,
[Period in Use],
interval(rangesum(peek(Accumulated),[Period in Use])) as Accumulated
FROM
[http://community.qlik.com/thread/56095?tstart=0]
(html, codepage is 1252, embedded labels, table is @1);
Rodrigo,
try using the peek() function, not above(), like
Acc:
LOAD Date,
Hour,
[Period in Use],
interval(rangesum(peek(Accumulated),[Period in Use])) as Accumulated
FROM
[http://community.qlik.com/thread/56095?tstart=0]
(html, codepage is 1252, embedded labels, table is @1);
Perfect, my friend!!
I'd tried with peek() but incorrectly!
Your script runs ok!!
Thank you so much!