Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
I would like to calculate the % of time robots are down during a period.
I found the way to calculate the time they are down :
=Aggr(sum(Interval(FIN_DEFAUT-DEBUT_DEFAUT)),AGV)
But I don't know how to calculate the total time of the period (in seconds should be the best option I think)
My calendar fields are : Year, Month, Week, Day and Date (the id in format DD/MM/YYYY).
So my goal is to make a table like this for example (here one specific date is selected, so 24 hours) :
Robot | Time down | % of period |
1 | 12:00:00 | 50.00% |
Thank you,
Guillaume
Hello guys,
Thank you for your answers.
I found an easy way to do what I want :
((num((max(Date)) -(min(Date)))+1)*86400)
I was looking for something too difficult .
So with this line I have the selected or not Qlikview period in seconds.
Regards,
Guillaume
Hi GuillaumeRUE,
I suspect you want to do this:
=Interval(Time#([YourDownTimeField], 'HH:MM:SS'), 'ss')/Interval(Time#('24:00:00'), 'HH:MM:SS'), 'ss')
I hope that helps!
Kind regards,
S.T.
Hello guys,
Thank you for your answers.
I found an easy way to do what I want :
((num((max(Date)) -(min(Date)))+1)*86400)
I was looking for something too difficult .
So with this line I have the selected or not Qlikview period in seconds.
Regards,
Guillaume