BusinessObjects Board

Calculate action difference

i have report like that

Num		open_date			resolve_date		group	action_date
1		01.21.2013 10:00	01.21.2013 23:00	GRP1	01.21.2013 11:00
1		01.21.2013 10:00	01.21.2013 23:00	GRP1	01.21.2013 12:00
1		01.21.2013 10:00	01.21.2013 23:00	GRP3	01.21.2013 13:00
1		01.21.2013 10:00	01.21.2013 23:00	GRP1	01.21.2013 16:00
2		01.21.2013 12:00	02.21.2013 16:00	GRP6	01.21.2013 14:00
2		01.21.2013 12:00	02.21.2013 16:00	GRP7	01.21.2013 15:00
2		01.21.2013 12:00	02.21.2013 16:00	GRP6	01.21.2013 19:00
3		01.21.2013 22:00	02.21.2013 22:00	GRP9	01.21.2013 23:30
3		01.21.2013 22:00	02.21.2013 22:00	GRP9	01.22.2013 01:00

i need to calculate time difference action time with previous row for each Num record.

Num		open_date			resolve_date		group	action_date			Diff
1		01.21.2013 10:00	01.21.2013 23:00	GRP1	01.21.2013 11:00	60
1		01.21.2013 10:00	01.21.2013 23:00	GRP1	01.21.2013 12:00	60
1		01.21.2013 10:00	01.21.2013 23:00	GRP3	01.21.2013 13:00	60
1		01.21.2013 10:00	01.21.2013 23:00	GRP1	01.21.2013 16:00	180
2		01.21.2013 12:00	02.21.2013 16:00	GRP6	01.21.2013 14:00	120
2		01.21.2013 12:00	02.21.2013 16:00	GRP7	01.21.2013 15:00	60
2		01.21.2013 12:00	02.21.2013 16:00	GRP6	01.21.2013 19:00	240
3		01.21.2013 22:00	02.21.2013 22:00	GRP9	01.21.2013 23:30	90
3		01.21.2013 22:00	02.21.2013 22:00	GRP9	01.22.2013 01:00	90

How to calculate time difference by previous row action date?
Thanks


iceice (BOB member since 2011-10-20)

Hi,

Use the Previous() function to get a value of an object from the previous row.

Use a formula similar to this one to subtract one date from another:


Marek Chladny :slovakia: (BOB member since 2003-11-27)

There is a previous row function in WebI. The other option is to do rank over partition by function and create a derived table in the universe using the database function.


mcliffordgoo :us: (BOB member since 2003-02-13)