# Compare a stat with previous timeframe

**URL:** https://discuss.elastic.co/t/compare-a-stat-with-previous-timeframe/118266
**Category:** Kibana
**Created:** [February 2, 2018, 6:15pm UTC](https://discuss.elastic.co/t/compare-a-stat-with-previous-timeframe/118266 "2018-02-02T18:15:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dorj1234](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dorj1234/32/21339_2.png) [@dorj1234](https://discuss.elastic.co/u/dorj1234)
#### Post date: [February 2, 2018, 6:15pm UTC](https://discuss.elastic.co/t/compare-a-stat-with-previous-timeframe/118266/1 "2018-02-02T18:15:26Z")

</div>

Hello, I seek a way in Kibana to show data value based on time, and also it's increase vs. day-1.  
My dataset is complex, but here is a simple example:

I have 2 columns: a number and a date.  
today's number is 50  
yesterday's number is 25  
2 days ago the number was 20

I want to create a kibana visual that shows:  
today increase is 100% (or 2X)  
yesterday the increase was 125% compared to the previous day.

Thank you in advance!  
JD

---

<div class="post-metadata">

### Author: ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)
#### Post date: [February 5, 2018, 8:09pm UTC](https://discuss.elastic.co/t/compare-a-stat-with-previous-timeframe/118266/2 "2018-02-05T20:09:26Z")

</div>

Hi

This can be achieved by using a derivative example. You must use a XY line chart as shown here.  
 ![image_1024](https://us1.discourse-cdn.com/elastic/original/3X/a/1/a16e0c0a46accbcaace0ea07037373cc353279c8.png)

This shows the increase over time. This can also be achieved using TSVB visualizations. It has a nice enhancement where you can see data Time shifted one day before  
maybe that will help you as well . In the Data \> Options panel, set the Offset series time to achieve the same.

Hope this helps,  
Thanks  
Rashmi

---

<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: [March 5, 2018, 8:09pm UTC](https://discuss.elastic.co/t/compare-a-stat-with-previous-timeframe/118266/3 "2018-03-05T20:09:52Z")

</div>

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