# Comparison of data in kibana dashboard

**URL:** <https://discuss.elastic.co/t/comparison-of-data-in-kibana-dashboard/31487>\
**Category:** Kibana\
**Created:** [October 1, 2015, 3:43pm UTC](https://discuss.elastic.co/t/comparison-of-data-in-kibana-dashboard/31487 "2015-10-01T15:43:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bubu.senapati](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bubu.senapati](https://discuss.elastic.co/u/bubu.senapati)\
**Post date:** [October 1, 2015, 3:43pm UTC](https://discuss.elastic.co/t/comparison-of-data-in-kibana-dashboard/31487/1 "2015-10-01T15:43:50Z")

</div>

I have a usecase which is as follows.  
I am counting no of db hits per second in application in kibana.  
I want to compare the db hits per second of last 15 mins with that of db hits which was 7 days ago in same time.

If current time is 1st october 4.40P.M.  
Then i want to compare the current db hit count with db hits on 24 th sept.  
How is it achievable.  
I tried with date range query but i am unable to finally achieve it.  
Basically i need a comparison graph of last 15 mins with the same 15 mins 1 week ago.

Thanks in advance.

regards  
Dibyananda

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [October 6, 2015, 4:51am UTC](https://discuss.elastic.co/t/comparison-of-data-in-kibana-dashboard/31487/2 "2015-10-06T04:51:16Z")

</div>

Not currently possible, feel free to +1 this issue, if this is important to you:

> <https://github.com/elastic/kibana/issues/1244>

---

<div class="post-metadata">

**Author:** ![just5guy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/just5guy/32/5198_2.png) [@just5guy](https://discuss.elastic.co/u/just5guy)\
**Post date:** [October 8, 2015, 12:54pm UTC](https://discuss.elastic.co/t/comparison-of-data-in-kibana-dashboard/31487/3 "2015-10-08T12:54:59Z")

</div>

I am also looking for this functionality. I want to compare Energy Usage (Watts) for different time frames on the same dashboard.

---

<div class="post-metadata">

**Author:** ![bubu.senapati](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bubu.senapati](https://discuss.elastic.co/u/bubu.senapati)\
**Post date:** [October 9, 2015, 5:06pm UTC](https://discuss.elastic.co/t/comparison-of-data-in-kibana-dashboard/31487/4 "2015-10-09T17:06:47Z")

</div>

i have a way out.  
If you want it i will post

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [October 10, 2015, 2:26pm UTC](https://discuss.elastic.co/t/comparison-of-data-in-kibana-dashboard/31487/5 "2015-10-10T14:26:43Z")

</div>

Please do post! I know of one workaround, which is to enable Groovy and use scripted fields to perform date math. Is that what you did?

---

<div class="post-metadata">

**Author:** ![bubu.senapati](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bubu.senapati](https://discuss.elastic.co/u/bubu.senapati)\
**Post date:** [October 10, 2015, 5:44pm UTC](https://discuss.elastic.co/t/comparison-of-data-in-kibana-dashboard/31487/6 "2015-10-10T17:44:17Z")

</div>

What i did is something tedious.  
First create a time field by splitting the timestamp. Name as field-time.  
Now in x axis take the field term and take max field 50.  
use custom metric and take max timestamp(the timestamp field that you choose during index creation).  
then subaggregate on date-range.  
in the range field you give the time you want to compare.  
in one u give now-h to now  
in the other you give now-25h to now-24h.  
try and let me know the result

---

<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:** [July 6, 2017, 2:11pm UTC](https://discuss.elastic.co/t/comparison-of-data-in-kibana-dashboard/31487/7 "2017-07-06T14:11:35Z")

</div>


