# Show only last records on a chart

**URL:** <https://discuss.elastic.co/t/show-only-last-records-on-a-chart/133645>\
**Category:** Kibana\
**Created:** [May 29, 2018, 8:57am UTC](https://discuss.elastic.co/t/show-only-last-records-on-a-chart/133645 "2018-05-29T08:57:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichaelDz](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@MichaelDz](https://discuss.elastic.co/u/MichaelDz)\
**Post date:** [May 29, 2018, 8:57am UTC](https://discuss.elastic.co/t/show-only-last-records-on-a-chart/133645/1 "2018-05-29T08:57:23Z")

</div>

I made a few Gauges following [christophilus advice](https://discuss.elastic.co/t/gauge-with-dynamic-maximum-value/130634/2) which visualize how much space is occupied on my servers.

I only care about a status for the present day so my workaround was to save dashboard with the time because I get new record only each day but I want to have my gauges on a dashboard with other charts and thus saving dashboard with the time is not an option.

How do I show only last records on a chart? Can I do it for example using some kind of special query like: `TIME >= CURRENT_TIMESTAMP - 24h` ?

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [May 30, 2018, 5:09pm UTC](https://discuss.elastic.co/t/show-only-last-records-on-a-chart/133645/2 "2018-05-30T17:09:56Z")

</div>

In the visualization itself, click on "add a filter", select your timestamp field, then "is between", and select "now-24h" as the "from" and "now" as the "to". Save that filter with the visualization. You may have to remove and re-add the visualization to your dashboard.

---

<div class="post-metadata">

**Author:** ![MichaelDz](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@MichaelDz](https://discuss.elastic.co/u/MichaelDz)\
**Post date:** [June 4, 2018, 12:08pm UTC](https://discuss.elastic.co/t/show-only-last-records-on-a-chart/133645/3 "2018-06-04T12:08:20Z")

</div>

Can I do the same thing on a Visual Builder chart?

---

<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 2, 2018, 12:10pm UTC](https://discuss.elastic.co/t/show-only-last-records-on-a-chart/133645/4 "2018-07-02T12:10:07Z")

</div>

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