How to calculate the no. of hours between the selected time range in Kibana?

I would like to know how I can get the number of hours in the selected time range. For example, If last 2 days is selected in kibana time picker, then I want to get the no. of hours in 2 days (ie., 48 hours).

We have an use case where we'll have to calculate the utilisation of a PC for testing.

Suppose, if a PC is utilised 10 hours for testing then we'll have to show the no. of hours utilised for testing and the remaining hours (14 hours if last 24 hours is selected in time picker) in a Pie chart.

The problem is to calculate the remaining hours based on the time range selected in kibana time picker.

Is it possible to calculate the no. of hours in the selected time range?

Thanks in Advance!

Hi @subash

That is not possible yet, but there's a feature request for Lens formula you can track for it: [Lens] Support bucket interval on formulas · Issue #151827 · elastic/kibana · GitHub

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.