# Timelion: comparison between today's results and the average of one month

**URL:** https://discuss.elastic.co/t/timelion-comparison-between-todays-results-and-the-average-of-one-month/154985
**Category:** Kibana
**Tags:** timelion
**Created:** [November 1, 2018, 9:59am UTC](https://discuss.elastic.co/t/timelion-comparison-between-todays-results-and-the-average-of-one-month/154985 "2018-11-01T09:59:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![karam](https://avatars.discourse-cdn.com/v4/letter/k/7bcc69/32.png) [@karam](https://discuss.elastic.co/u/karam)
#### Post date: [November 1, 2018, 9:59am UTC](https://discuss.elastic.co/t/timelion-comparison-between-todays-results-and-the-average-of-one-month/154985/1 "2018-11-01T09:59:43Z")

</div>

I wish in a Timelion compare the results today with those of the month (the average of the month).  
I did :

.es(timefield=@timestamp), .es(offset=-1M, timefield=@timestamp)

I do not know what exactly is the offset = -1M !! does it take the average of last month?

---

<div class="post-metadata">

### Author: ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)
#### Post date: [November 2, 2018, 5:07pm UTC](https://discuss.elastic.co/t/timelion-comparison-between-todays-results-and-the-average-of-one-month/154985/2 "2018-11-02T17:07:27Z")

</div>

Hi Karam,

`.es(timefield=@timestamp), .es(offset=-1M, timefield=@timestamp)` creates separate series in the Timelion chart showing count aggregations for the current time range and the same time range minus one month. So if your time range is set to July 1 to July 6, the offset will add a series to the chart for June 1 to June 6.

You can change the aggregation to average by adding the `metric=avg:<field>` parameter to your expressions.

---

<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: [November 30, 2018, 5:07pm UTC](https://discuss.elastic.co/t/timelion-comparison-between-todays-results-and-the-average-of-one-month/154985/3 "2018-11-30T17:07:32Z")

</div>

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