# Calculate percentages bases on elapsed duration

**URL:** <https://discuss.elastic.co/t/calculate-percentages-bases-on-elapsed-duration/198665>\
**Category:** Elasticsearch\
**Created:** [September 9, 2019, 11:01am UTC](https://discuss.elastic.co/t/calculate-percentages-bases-on-elapsed-duration/198665 "2019-09-09T11:01:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alisa\_Faingold](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alisa_faingold/32/45836_2.png) [@Alisa\_Faingold](https://discuss.elastic.co/u/Alisa_Faingold)\
**Post date:** [September 9, 2019, 11:01am UTC](https://discuss.elastic.co/t/calculate-percentages-bases-on-elapsed-duration/198665/1 "2019-09-09T11:01:28Z")

</div>

Hi,  
I have logs from a phone device, and I would like to calculate how long from the time the device was operating, the wifi was active (  
I use the elapsed filter to calculate the activity times (there are a start log and end log for each operation), and then I can use the violation tool to sum all these times.  
How can I divide the wifi's total time by the device's total time?  
In my understanding, it is not possible to do this through the Kibana, but I cannot do it through the Logstash since I want to sum up the elapsed duration in the log. Is there any other way to do what I want?

Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 7, 2019, 11:01am UTC](https://discuss.elastic.co/t/calculate-percentages-bases-on-elapsed-duration/198665/2 "2019-10-07T11:01:38Z")

</div>

Closed on October 7, 2019, 11:01am UTC

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