3 Replies Latest reply: Sep 29, 2011 1:30 PM by Stefan Wühl

# interval between rows in the same column / intervalo entre filas de la misma columna

Buenos días, necesito restar datos entre filas, es decir de una misma  columna.

Hello, I need to subtract dates between rows, ie the same column.

NameTimeStateCode
Person 101/01/2011  8:16:11 Logged - in0
Person 101/01/2011  16:00:11 Logout

130

"Time"= 01/01/2011 16:00:11 - 01/01/2011 08:16:11 = 07:44:00

Necesito el restulado en horas de la resta

I need restulado in hours of rest

Soy novato, espero ayuda por favor, muchas gracias por todo

I'm newbie, I hope help please

thank you very much for everything

• ###### interval between rows in the same column / intervalo entre filas de la misma columna

Hi,

I think you can try chart inter record functions like above, i.e. like this

= interval(Time- above(Time))

as expression in your chart. This will show the time difference between current and above row, for each row in your table.

Hope this helps,

Stefan

• ###### Re: interval between rows in the same column / intervalo entre filas de la misma columna

ok thanks :-).

ahora se complica un poco mas porque necesito condiciones.

now a little more complicated because I need conditions.

NameTimeStateCode
Person 101/01/2011  8:16:11Logged - in0
Person 101/01/2011  16:00:11Logout

23658

Person 1                        01/01/2011  19:00:11                             ready                                   44

Person 1                       01/01/2011  19:00:11                            Logout                                130

Necesito el intervalo de "Time", SI    "state"="Logged - in"  y  "Code"="130".

Need interval of "Time", if "state" = "Logged - in"   and   "Code" = "130"

Gracias

• ###### Re: interval between rows in the same column / intervalo entre filas de la misma columna

Hi,

to create a time difference, you need to use two rows, so given your above example

- I don't see a matching row for state=Logged in" and Code=130

- If there is a match, to what other row should the interval difference be taken? Using the previous row or the previous row which matches the condition?

Could you provide maybe a more complete data sample (as INLINE table or sample qvw file) and the exprected results?

Regards,

Stefan