Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys
I would like to calculate per session a ratio "number of rows / second", i have 4 columns in my set of data.
- SESSION_ID (integer)
- SESSION_START_TIME (timestamp)
- SESSION_END_TIME (timestamp)
- SESSION_SUCCESSFUL_ROWS (integer)
when i try to calculate in an expression this ratio, i have wrong result using this formula :
=SESSION_SUCCESSFUL_ROWS / INTERVAL(NUM(SESSION_END_TIME) - NUM(SESSION_START_TIME),'s')
Thanks for your help
JP
The interval() function will only format the time difference in seconds, the internal numerical representation is still fraction of days.
Try something like
(SESSION_END_TIME-SESSION_START_TIME) / maketime(0,0,1)
to calculate the amount of seconds.
I assume you are using your expression in the context of SESSION_ID (like using SESSION_ID as dimension in a chart), right?
The interval() function will only format the time difference in seconds, the internal numerical representation is still fraction of days.
Try something like
(SESSION_END_TIME-SESSION_START_TIME) / maketime(0,0,1)
to calculate the amount of seconds.
I assume you are using your expression in the context of SESSION_ID (like using SESSION_ID as dimension in a chart), right?
Thanks for your help.
Yes You're right !
Your formula to calculate the amount of seconds works fine.