# Timelion: Show both current & previous date time while comparing data

**URL:** <https://discuss.elastic.co/t/timelion-show-both-current-previous-date-time-while-comparing-data/236276>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [June 9, 2020, 6:57am UTC](https://discuss.elastic.co/t/timelion-show-both-current-previous-date-time-while-comparing-data/236276 "2020-06-09T06:57:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![muthucse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/muthucse/32/45217_2.png) [@muthucse](https://discuss.elastic.co/u/muthucse)\
**Post date:** [June 9, 2020, 6:57am UTC](https://discuss.elastic.co/t/timelion-show-both-current-previous-date-time-while-comparing-data/236276/1 "2020-06-09T06:57:32Z")

</div>

Hello All,

While comparing the current value with previous value, I am trying to display the current and previous time while hovering the mouse. Current data time is already displayed. Is there a way that i could display the previous datetime also ?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [June 9, 2020, 12:07pm UTC](https://discuss.elastic.co/t/timelion-show-both-current-previous-date-time-while-comparing-data/236276/3 "2020-06-09T12:07:08Z")

</div>

I don't think this is possible in Timelion, but I'm not sure whether I understand correctly.

Maybe I'm missing something, but what exactly is the use case? Isn't the previous time always the time currently displayed minus the interval of the x axis? How is the previous time helping?

---

<div class="post-metadata">

**Author:** ![muthucse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/muthucse/32/45217_2.png) [@muthucse](https://discuss.elastic.co/u/muthucse)\
**Post date:** [June 9, 2020, 12:15pm UTC](https://discuss.elastic.co/t/timelion-show-both-current-previous-date-time-while-comparing-data/236276/4 "2020-06-09T12:15:31Z")

</div>

If i am comparing current data with last week data by providing the offset as -1w. I have selected time range as today in kibana show dates section. How do i know is it comparing today's data with last week this days data or with yesterdays data ? Attaching screenshot in which we are able to see current date not the previous date which we are comparing.

 ![Data-Comparison](https://us1.discourse-cdn.com/elastic/original/3X/6/9/695822498e841b5242a94f75f5ddd08348fdee88.png)

---

<div class="post-metadata">

**Author:** ![muthucse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/muthucse/32/45217_2.png) [@muthucse](https://discuss.elastic.co/u/muthucse)\
**Post date:** [June 9, 2020, 12:18pm UTC](https://discuss.elastic.co/t/timelion-show-both-current-previous-date-time-while-comparing-data/236276/5 "2020-06-09T12:18:24Z")

</div>

If both the current and previous dates are provided on the mouse pointer which will be really helpful to understand the comparison. Is it possible with Timelion or any of the other visualizations ?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [June 9, 2020, 12:20pm UTC](https://discuss.elastic.co/t/timelion-show-both-current-previous-date-time-while-comparing-data/236276/6 "2020-06-09T12:20:26Z")

</div>

I see - it's not possible to display a second date in timelion, but you could label the series - that makes it pretty clear:

```auto
.es().label(current), .es(offset=-1w).label('prev week')

```

![Screenshot 2020-06-09 at 14.20.09](https://us1.discourse-cdn.com/elastic/original/3X/6/8/687fa816dad10bd5f65131434501e43705913a7f.png)

---

<div class="post-metadata">

**Author:** ![muthucse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/muthucse/32/45217_2.png) [@muthucse](https://discuss.elastic.co/u/muthucse)\
**Post date:** [June 9, 2020, 12:23pm UTC](https://discuss.elastic.co/t/timelion-show-both-current-previous-date-time-while-comparing-data/236276/7 "2020-06-09T12:23:23Z")

</div>

Thanks for the update! What if we select today as date range in kibana (show dates) and in timelion -1w offset to compare. will it compare today's data with last week this day data or today's data with yesterday's data ?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [June 9, 2020, 12:26pm UTC](https://discuss.elastic.co/t/timelion-show-both-current-previous-date-time-while-comparing-data/236276/8 "2020-06-09T12:26:42Z")

</div>

It will compare today with last week this day - for the time shifted series the configured time range of the date picker is also shifted by the same amount.

---

<div class="post-metadata">

**Author:** ![muthucse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/muthucse/32/45217_2.png) [@muthucse](https://discuss.elastic.co/u/muthucse)\
**Post date:** [June 9, 2020, 12:34pm UTC](https://discuss.elastic.co/t/timelion-show-both-current-previous-date-time-while-comparing-data/236276/9 "2020-06-09T12:34:43Z")

</div>

Thanks !

---

<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 7, 2020, 12:48pm UTC](https://discuss.elastic.co/t/timelion-show-both-current-previous-date-time-while-comparing-data/236276/10 "2020-07-07T12:48:55Z")

</div>

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