# How to compare most recent daily metrics with previous day's metrics

**URL:** https://discuss.elastic.co/t/how-to-compare-most-recent-daily-metrics-with-previous-days-metrics/167695
**Category:** Kibana
**Created:** [February 9, 2019, 12:24am UTC](https://discuss.elastic.co/t/how-to-compare-most-recent-daily-metrics-with-previous-days-metrics/167695 "2019-02-09T00:24:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Steve\_Potter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_potter/32/39953_2.png) [@Steve\_Potter](https://discuss.elastic.co/u/Steve_Potter)
#### Post date: [February 9, 2019, 12:24am UTC](https://discuss.elastic.co/t/how-to-compare-most-recent-daily-metrics-with-previous-days-metrics/167695/1 "2019-02-09T00:24:28Z")

</div>

This is probably a simple one for someone who knows what they are doing.

I have some metrics that are collected M-F, and everything from a given day has the same timestamp. I'd like to compare the most recent daily set with the set from the previous day.

E.g. something like:

```
{timestamp=2/7/2019, foo=1}
{timestamp=2/7/2019, bar=2}

{timestamp=2/8/2019, foo=1}
{timestamp=2/8/2019, bar=3}

```

And I'd like to give a table of the most recent delta foo & delta bar. I can't use ranges relative to 'now', because the latest run isn't necessarily within the last 24 hours (e.g. most recent run is Friday and the query is early Monday). I would bet that it's a simple query, but I can't figure out how to tell kibana which data I want it to use. Anybody?

---

<div class="post-metadata">

### Author: ![cjcenizal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjcenizal/32/11216_2.png) [@cjcenizal](https://discuss.elastic.co/u/cjcenizal)
#### Post date: [February 9, 2019, 1:03am UTC](https://discuss.elastic.co/t/how-to-compare-most-recent-daily-metrics-with-previous-days-metrics/167695/2 "2019-02-09T01:03:53Z")

</div>

Hi Steve, I recently answered a similar question and suggested the user use Timelion to create a visualization. It will appear as a chart, not a table, but at least it will allow you to compare values from one time to a previous time. Can you take a look at [Adding time range query to one column of a Data table visualization in kibana](https://discuss.elastic.co/t/adding-time-range-query-to-one-column-of-a-data-table-visualization-in-kibana/167600/2) and let me know if it helps?

Thanks,  
CJ

---

<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 9, 2019, 1:12am UTC](https://discuss.elastic.co/t/how-to-compare-most-recent-daily-metrics-with-previous-days-metrics/167695/3 "2019-03-09T01:12:02Z")

</div>

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