Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
somehow I got stuck with simple math. Please see attachment. I don't get why "Dur" field calculation (average, dividing) is wrong.
That field is tagged $numeric
Thanks in advance,
Viesturs
Hi,
maybe it is the group to multiply the count.
The result you are obtainng is 26847 / 4 / 86400
Can you please explain what do you mean by "maybe it is the group to multiply the count."?
Somehow I don't get it why does Qlikview divide by that 86400?
In the image I see the JobDefinitionTitle, and seems to be a cyclic group (or expression group?).
Maybe it is due to this group that you have the result/86400.
But without the qvw it is difficult to understand.
Can you post a sample application? It will be easier to troubleshoot the issue with a qvw.
I've attached sample file with scrambled data. You should see sample when open file (have to cycle group however).
I can see in the sample file that you are using "Interval" function to get teh value of field Dur, which formats the expression as a time interval according to the string given as a format-code. If the format code is omitted, the time format set in the operating system is used (From qlikview Help ).
So, I don't think, the operation average and division will work in the similar way for a time interval as for any other integer/numeric value.
Can you suggest how to get difference between two timestamps in seconds?
To get the difference between 2 timestamps you can use an expression as :
=Time(Time(time#(Date_Num,'hhmmss'),'hh:mm:ss') - Time(now(),'hh:mm:ss'),'hh:mm:ss')
Where Date_Num is the field name and I have used function Now() to get another timestamp. You can replace them with your own field names.
Hope this helps!