BusinessObjects Board

Time difference

I have the following requirement.

Emp ID…DateTime…Required
000001…20-jan-2009 13:30…This should be 0
000001…20-jan-2009 17:30…Difference between this row time and previous row time (20-jan-2009 13:30 minus 20-jan-2009 17:30)
000001…21-jan-2009 03:30…Difference between this row time and previous row time (21-jan-2009 03:30 minus 20-jan-2009 13:30)

000002…20-jan-2009 01:00…The calculation should reset here, as emp id changed. This should be 0
000002…20-jan-2009 13:30…Difference between this row time and previous row time (20-jan-2009 13:30 minus 20-jan-2009 01:00)

Please help

Kind Regards.


godgift :india: (BOB member since 2004-07-09)

Try using Previous() to get the previous value.


Jansi :india: (BOB member since 2008-05-12)

How to reste the calculation. And how to do the time difference


godgift :india: (BOB member since 2004-07-09)

I don’t know whether this is applicable in XIR2, but in XI 3.1 pdf has explanation for Previous function and its parameters(one is reset_dims). Have a look into it. And for difference, use something like this. [DateTime]-Previous([DateTime];optional parameters)


Jansi :india: (BOB member since 2008-05-12)

[DateTime]-[DateTime] doesn’t work. It gives error.

I believe you cannot do substraction of date time like this


godgift :india: (BOB member since 2004-07-09)

Even after you suggested suitable title, I really missed out that information, but concentrated on Previous and Reset. :oops:


Jansi :india: (BOB member since 2008-05-12)

Thanks alot Jansi for your help.

Can any one please help me in calculating the time difference please


godgift :india: (BOB member since 2004-07-09)

Check this post in FAQ. But I don’t think it’ll be useful to you now, as you need the logic in the report. I’ll post if I get any idea on this.


Jansi :india: (BOB member since 2008-05-12)