Need to calculate a single value event rate and visualize it

I need to calculate the event rate and show it as a single value (metric).

E.g. I've the following documents:

Column 1 Column 2
Timestamp Data
1.2.2024 15:30 Event 1
1.2.2024 15:45 Event 2
2.2.2024 10:30 Event 3
2.2.2024 14:30 Event 4
2.2.2024 15:00 Event 5
3.2.2024 10:30 Event 6
...

If the user selects e.g. 2.2.2024 10:00-2.2.2024 15:00
Screenshot 2024-11-26 at 11.25.52
the calculation should be:
3/(2.2.2024 15:00-2.2.2024 10:30)

3=number of events in the selected timespan
(2.2.2024 15:00-2.2.2024 10:30)=timespan in seconds

Is this possible to add this as a visualization in Kibana?