# I want to show today traffic and last month average traffic together in timelion

**URL:** https://discuss.elastic.co/t/i-want-to-show-today-traffic-and-last-month-average-traffic-together-in-timelion/209031
**Category:** Kibana
**Tags:** timelion
**Created:** [November 22, 2019, 9:01am UTC](https://discuss.elastic.co/t/i-want-to-show-today-traffic-and-last-month-average-traffic-together-in-timelion/209031 "2019-11-22T09:01:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Yungyoung\_Ok](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yungyoung_ok/32/43465_2.png) [@Yungyoung\_Ok](https://discuss.elastic.co/u/Yungyoung_Ok)
#### Post date: [November 22, 2019, 9:01am UTC](https://discuss.elastic.co/t/i-want-to-show-today-traffic-and-last-month-average-traffic-together-in-timelion/209031/1 "2019-11-22T09:01:37Z")

</div>

i want to show today traffic and last month average traffic together.

here is my timelion query.  
for example, today is 2019-11-21

today traffic(2019-11-21) query: .es(index=indexname, timefield=mytimestamp)  
last month average traffic(2019-10-20 ~ 2019-11-20) query: .es(index=indexname, timefield=mytimestamp, metric=count).movingaverage(window=-1M)

is it right???

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [November 22, 2019, 5:05pm UTC](https://discuss.elastic.co/t/i-want-to-show-today-traffic-and-last-month-average-traffic-together-in-timelion/209031/2 "2019-11-22T17:05:13Z")

</div>

> .es(index=indexname, timefield=mytimestamp)

This will show you the current traffic.

> .es(index=indexname, timefield=mytimestamp, metric=count).movingaverage(window=-1M)

If you're looking to compare this month's traffic to the previous months, you'll want to use an `offset=-1M`, which is explained here: [Timelion | Kibana Guide [8.11] | Elastic](https://www.elastic.co/guide/en/kibana/current/timelion.html#time-series-compare-data)

---

<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: [December 20, 2019, 5:05pm UTC](https://discuss.elastic.co/t/i-want-to-show-today-traffic-and-last-month-average-traffic-together-in-timelion/209031/3 "2019-12-20T17:05:15Z")

</div>

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