# Timelion and ISO Week

**URL:** https://discuss.elastic.co/t/timelion-and-iso-week/115238
**Category:** Kibana
**Tags:** timelion
**Created:** [January 12, 2018, 8:14am UTC](https://discuss.elastic.co/t/timelion-and-iso-week/115238 "2018-01-12T08:14:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Hannah](https://avatars.discourse-cdn.com/v4/letter/h/f04885/32.png) [@Hannah](https://discuss.elastic.co/u/Hannah)
#### Post date: [January 12, 2018, 8:14am UTC](https://discuss.elastic.co/t/timelion-and-iso-week/115238/1 "2018-01-12T08:14:12Z")

</div>

Hi there, I would like to compare two weeks with:

`.es(index=my-index, metric="sum:sessions").label('past week'), .es(index=my-index, metric="sum:sessions", offset=-1w).label('prev week')`

At the moment with offset=-1w I get one day more then expected and after that every day duplicated in the timeline (x-axis) so how do I tell Kibana that I want to get an iso week?

---

<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: [January 12, 2018, 1:50pm UTC](https://discuss.elastic.co/t/timelion-and-iso-week/115238/2 "2018-01-12T13:50:07Z")

</div>

Hey @Hannah, using the offset of "-1w" is the equivalent of "-7d" (subtract 7 days) and it isn't tied to days of the week and is relative to the current selected time-range.

So using your query with the absolute date ranges of "January 5th 2018, 00:00:00.000 to January 12th 2018, 23:59:59.999" produces the following chart:

![01 AM](https://us1.discourse-cdn.com/elastic/original/3X/9/0/90db471bd1316c20f27ffa59abc851d07847c688.png)

Which has two series on in, with the "past week" showing the values for "January 5th 2018, 00:00:00.000 to January 12th 2018, 23:59:59.999" and the "prev week" showing the values for "December 29th 2017, 00:00:00.000 to January 5th 2018, 23:59:59.999", with the "prev week" being 7 days (1 week) before the "past week"

---

<div class="post-metadata">

### Author: ![Hannah](https://avatars.discourse-cdn.com/v4/letter/h/f04885/32.png) [@Hannah](https://discuss.elastic.co/u/Hannah)
#### Post date: [January 14, 2018, 3:02pm UTC](https://discuss.elastic.co/t/timelion-and-iso-week/115238/3 "2018-01-14T15:02:43Z")

</div>

Hi @Brandon_Kobel, thank you for the information about the iso week. Maybe I was barking up the wrong tree.  
Do you got another hint for this: When you look at the visualisation it's different from the dashboard on the x-axis with the day:

 ![dashboard](https://us1.discourse-cdn.com/elastic/original/3X/3/d/3d1fb27901a5de7c79b2fbd935610903b889da81.jpg)

 ![visualisation](https://us1.discourse-cdn.com/elastic/original/3X/a/b/abae9d58d34078d045a11e76d8a5d2624851cc62.jpg)

Why is Kibana doing that? Index is the same as above.

---

<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: [January 15, 2018, 1:39pm UTC](https://discuss.elastic.co/t/timelion-and-iso-week/115238/4 "2018-01-15T13:39:50Z")

</div>

Hey @Hannah, are both of these charts Timelion charts, with the difference being one is added to the Dashboard and the other isn't? The x/y axis appear to be different scales, are those the differences you're referring to?

---

<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: [February 12, 2018, 1:39pm UTC](https://discuss.elastic.co/t/timelion-and-iso-week/115238/5 "2018-02-12T13:39:56Z")

</div>

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