# Interval and timestamp does not work as expected

**URL:** <https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345>\
**Category:** Kibana\
**Created:** [September 3, 2020, 8:40am UTC](https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345 "2020-09-03T08:40:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Redcxx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/redcxx/32/73872_2.png) [@Redcxx](https://discuss.elastic.co/u/Redcxx)\
**Post date:** [September 3, 2020, 8:40am UTC](https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345/1 "2020-09-03T08:40:56Z")

</div>

Hi currently it is Sep 03 09:38 here, the explore tab shows that there is data of timestamp Sep 02 10:03, I set the interval in TSVB for 1d but there is no data, in fact it shows nothing for 2d as well. The data appear when I set it to 3d. May I know what is going on?  
Thanks!

The visualization:

 ![Screenshot 2020-09-03 at 09.32.42](https://us1.discourse-cdn.com/elastic/original/3X/a/6/a64d359436b70cf8fc6a38a921b320181caecd39.png)

The explore tab:

 ![Screenshot 2020-09-03 at 09.33.16 1](https://us1.discourse-cdn.com/elastic/original/3X/3/d/3d1180b27255df2af1b02f4137a5c0b2f5764571.png)

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [September 10, 2020, 11:11pm UTC](https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345/2 "2020-09-10T23:11:00Z")

</div>

The most likely thing that you're seeing here is that TSVB, by default, is picking the **most recent bucket only**. You can see this in your screenshot as "Data timerange mode". So for example when I choose an interval of 1d, TSVB might pick "30 minutes" and show only the most recent 30 minutes of data.

You might be expecting "entire time range" which is an option.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 11, 2020, 2:56am UTC](https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345/3 "2020-09-11T02:56:57Z")

</div>

Hi @Redcxx as @wylie it most likely has to do last bucket vs entire time range.

I just had a fairly extensive conversation on this / very similar topic [here](https://discuss.elastic.co/t/tsvb-value-is-0-when-time-filter-set-to-today-and-data-time-range-mode-set-to-last-value/246719)

You might find a deeper explanation there

---

<div class="post-metadata">

**Author:** ![Redcxx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/redcxx/32/73872_2.png) [@Redcxx](https://discuss.elastic.co/u/Redcxx)\
**Post date:** [September 15, 2020, 1:48pm UTC](https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345/4 "2020-09-15T13:48:29Z")

</div>

Hi @wylie and @stephenb, thanks for the reply!

In the link you send me I found that:

> _"This setting controls the timespan used for matching documents. "Entire timerange" will match all the documents selected in the timepicker. "Last value" will match only the documents for the specified interval from the end of the timerange."_

So this means that my setting should match the last value of my given interval 1d which should capture all the data that I uploaded for the last 24 hours right? So why am I not seeing any data? Did I missed anything? Thanks

---

<div class="post-metadata">

**Author:** ![Redcxx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/redcxx/32/73872_2.png) [@Redcxx](https://discuss.elastic.co/u/Redcxx)\
**Post date:** [September 15, 2020, 1:51pm UTC](https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345/5 "2020-09-15T13:51:13Z")

</div>

Hi,

Thanks for the reply, I want to aggregate on the data from the last 24 hours, if I were to choose entire time range, this will not do what I want. I want the data from last 24 hours, is there a way to do that? Thanks

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 15, 2020, 2:25pm UTC](https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345/6 "2020-09-15T14:25:41Z")

</div>

@Redcxx

> [@Redcxx](#):
>
> I want the data from last 24 hours, is there a way to do that?

Hi I am a little confused what you want. Can you please describe want you are looking for a bit in a bit more detail?

Do you want a Line or a Single Metric?

Say you collect metrics at 10s interval

Do you want a Single Number that Aggregates say Average CPU for the entire 24 Hours?

The following example give the CPU Avg over the entire 24 hours as a single Number

 ![Screen Shot 2020-09-15 at 7.46.46 AM](https://us1.discourse-cdn.com/elastic/original/3X/b/d/bdedb4e251d491c9b7631e040fb794c3899af6e0.png)

 ![Screen Shot 2020-09-15 at 7.47.51 AM](https://us1.discourse-cdn.com/elastic/original/3X/1/9/19929e88d1882cfce728c6157cead7a5ff743321.png)

---

<div class="post-metadata">

**Author:** ![Redcxx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/redcxx/32/73872_2.png) [@Redcxx](https://discuss.elastic.co/u/Redcxx)\
**Post date:** [September 20, 2020, 8:49am UTC](https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345/7 "2020-09-20T08:49:55Z")

</div>

Thanks for replying  
I mean can I have some kind of time filter without using the time filter on the top right hand corner?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 20, 2020, 10:16pm UTC](https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345/8 "2020-09-20T22:16:08Z")

</div>

Hi @Redcxx

I am not quite clear what you are asking for.

For time series data the Time Picker in Top Right sets the time range for the visualization and / or dashboard.

Can you explain in a little more detail what you are looking for.

Example

I want to put a visualization on a Dashboard where the dashboard time range (Time Picker Top Right) is last 2 weeks but for a particular visualization I only want the last 24 hours.

Depending on what you are trying to accomplish you can save the Time Picker either relative or absolute as part of the visualization...

CORRECTION : Today on a dashboard you CAN set a different timepicker for each visualization See Below

BTW Have you tried Lens yet for visualizations?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 22, 2020, 4:02am UTC](https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345/9 "2020-09-22T04:02:39Z")

</div>

@Redcxx

Turns out I was wrong sometime lately we added this capability

So here is a dashboard Time Picker Last 4 Hours

 ![Screen Shot 2020-09-21 at 8.55.43 PM](https://us1.discourse-cdn.com/elastic/original/3X/4/4/44cff07c6b999888835cd74cca63401241d5f558.png)

Now edit and Select Customized Time Range

 ![Screen Shot 2020-09-21 at 8.55.56 PM](https://us1.discourse-cdn.com/elastic/original/3X/4/5/45c7c40e7ef64c2ee0ac11610228b81a51d61305.png)

Now Set the Time you want Relative or Absolute

 ![Screen Shot 2020-09-21 at 9.00.39 PM](https://us1.discourse-cdn.com/elastic/original/3X/f/8/f8195d1c6f382496868debb21a911b0e6cee7739.png)

Let us know if this helps.

---

<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:** [October 20, 2020, 4:02am UTC](https://discuss.elastic.co/t/interval-and-timestamp-does-not-work-as-expected/247345/10 "2020-10-20T04:02:45Z")

</div>

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