# TSVB, Value is 0 when time filter set to "Today" and "Data time range mode" set to"Last Value"

**URL:** 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
**Category:** Kibana
**Created:** [August 28, 2020, 6:33am UTC](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 "2020-08-28T06:33:14Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mcarthcat](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@mcarthcat](https://discuss.elastic.co/u/mcarthcat)
#### Post date: [August 28, 2020, 6:33am UTC](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/1 "2020-08-28T06:33:14Z")

</div>

first.. i`m not good at english. Excuse me..

* * *

## scenario

- kibana v7.8.0
- metricbeat (cpu) is running
- Time Filter : `Today`
- visulize : [TSVB / Gauge]
  - Data
    - Metric
      - Aggregation : `Average`
      - Field: `system. memory.used.pct`

    - Group by : `Everything`

  - Panel Option \> Data
    - Data timerange mode : `Last value`
    - IndexPattern : `metricbeat-*`
    - Time field : `@timestamp`
    - interval : `>=60s`

* * *

I want to see the metric value of the last interval among intervals with values.

but, When i set this Scenario, result is 0.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/d/fd71c16bd535eba9eaf170d6361ef9d80004030d.png)

I guess, It report interval is [23:59:00 TO 24:00:00] .  
but, i want get report interval is [now-60s/s TO now/s] .

Is there any other way? (If it is an before time range also consider it.)

---

<div class="post-metadata">

### Author: ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)
#### Post date: [August 28, 2020, 8:12pm UTC](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/2 "2020-08-28T20:12:05Z")

</div>

Your configuration looks correct. Are there values if you expand your time range?

---

<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: [August 29, 2020, 11:38pm UTC](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/3 "2020-08-29T23:38:49Z")

</div>

Hi @mcarthcat

Welcome to the community....

As @Nathan_Reese said your config looks good...

Let me walk you through what is happening.

There is a very short description but it is a bit hard to understand

_"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 "Today" Mean the 24 Hour Cycle (00:00:00 to 23:59:59) in your Time Zone so let pretend it is 4 PM Local Time...

1st Click on the Time Series choice and see if you get line data...  
You should but you will notice it does not go all the way accross the graph

 ![Screen Shot 2020-08-29 at 4.21.51 PM](https://us1.discourse-cdn.com/elastic/original/3X/0/7/073d2e2a79e08ca9f839784be94947abbcb11833.png)

That is because the Day is not complete...  
So now click on the Gauge.... You will see 0 because that is what you asked for:

See it use the Last value. The Last Value for Today will be the average CPU from 23:50 to 23:59:59 which has not happened yet so Value Avg Value for the last 10 minutes of Today is 0 as reported. So Last Bucket for time range Today does not really make sense.

 ![Screen Shot 2020-08-29 at 4.26.17 PM](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d65a7c08a0ea801ee7314e68fb223affb942959e.png)

If you switch Time picker to last 24 hours you will get what you expect.

 ![Screen Shot 2020-08-29 at 4.29.18 PM](https://us1.discourse-cdn.com/elastic/original/3X/6/6/668f115afab8d69bf9ce108e1b3d598d959c8241.png)

Now it uses the lass full 10 minute bucket that is available for the Average CPU...

 ![Screen Shot 2020-08-29 at 4.29.27 PM](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d6e0a4d3ba1c1bc01eb2d735153f1e84b6383bc2.png)

Still following 🙂

Now if you want to show the average CPU for today Up Till now...

You just select Entire Time Range and it will give the Average from the Beginning of today up untill now.

 ![Screen Shot 2020-08-29 at 4.36.32 PM](https://us1.discourse-cdn.com/elastic/original/3X/4/a/4a119b7b0dfe85a02eb703ff572720e25346e4bc.png)

Most the time for Gauges folks are interested what the Avg / Max / Min is for the last Bucket / Time range... Or over a time range ... but when you Use Today you need to think about that Today is a specific 24 hours. (Same for This Week, This Month etc)

The size of the bucket will always be the greater of the interval set in the panel options or the interval calculated for the time series.

Hope this helps a bit....

---

<div class="post-metadata">

### Author: ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)
#### Post date: [August 30, 2020, 1:34pm UTC](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/4 "2020-08-30T13:34:02Z")

</div>

@stephenb Thanks for the explanation. This is a very technical nuance that is asking too much from the user to understand. I created [https://github.com/elastic/kibana/issues/76251](https://github.com/elastic/kibana/issues/76251) to add some warning messages to help guide users into why they are seeing no data.

---

<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: [August 30, 2020, 3:15pm UTC](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/5 "2020-08-30T15:15:31Z")

</div>

Thank you for the feedback, it is appreciated.

TSVB is a very technical visualization tool and many features in it are built for our power users, perhaps take a look at Lens, it is much simpler to use. (Drag and Drop etc).

Lens is our new visualization tool made for folks that have not been in a Kibana before, it is simpler and yet its capabilities are growing. I think if you'd use Lens first you would have got the graph you wanted within a couple minutes.

There is a quick video on it here:

> **[Kibana Lens: An easy, intuitive way to visualize data](https://www.elastic.co/webinars/kibana-lens-an-easy-intuitive-way-to-visualize-data)**
>
> Welcome to Kibana Lens, a new simple and intuitive way for everyone to visualize their data inside of Kibana. With a new drag and drop interface, one-click data exploration features, and the power to provide visualization suggestions, Lens is the...

---

<div class="post-metadata">

### Author: ![mcarthcat](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@mcarthcat](https://discuss.elastic.co/u/mcarthcat)
#### Post date: [September 22, 2020, 11:00am UTC](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/6 "2020-09-22T11:00:59Z")

</div>

@stephenb  
hmm.. My geuss is right.  
If so, Is it much better to show text "last interval value" than "last value"?  
Thank you for response and advice.

---

<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, 11:01am UTC](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/7 "2020-10-20T11:01:20Z")

</div>

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