# Gauge with dynamic maximum value

**URL:** <https://discuss.elastic.co/t/gauge-with-dynamic-maximum-value/130634>\
**Category:** Kibana\
**Created:** [May 4, 2018, 1:11pm UTC](https://discuss.elastic.co/t/gauge-with-dynamic-maximum-value/130634 "2018-05-04T13:11:43Z")\
**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 4, 2018, 1:11pm UTC](https://discuss.elastic.co/t/gauge-with-dynamic-maximum-value/130634/1 "2018-05-04T13:11:43Z")

</div>

I have a data coming from logstash that shows how much space is used on a table in a database and maximum allocated capacity for a table. I want to create in Kibana gauges for every table that show how much space is currently occupied.

The problem is that maximum available space sometimes changes so the limit for a gauge has to be set as a variable and I can't figure out how to do this. I also don't know how to show only data from current day on a dashboard for a time range. Data coming from logstash looks like that:

| time&nbsp; | table\_name | used\_gb | max\_gb |
| 25.04.18 | table\_1&nbsp; | 1.2&nbsp; | 10.4&nbsp; |
| 25.04.18&nbsp; | table\_2&nbsp; | 4.6&nbsp; | 5.0&nbsp; |
| 26.04.18&nbsp; | table\_1&nbsp; | 1.4&nbsp; | 14.6&nbsp; |
| 26.04.18&nbsp; | table\_2&nbsp; | 4.9&nbsp; | 5.0&nbsp; |

---

<div class="post-metadata">

**Author:** ![christophilus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophilus/32/42991_2.png) [@christophilus](https://discuss.elastic.co/u/christophilus)\
**Post date:** [May 4, 2018, 7:49pm UTC](https://discuss.elastic.co/t/gauge-with-dynamic-maximum-value/130634/2 "2018-05-04T19:49:01Z")

</div>

Hi Michael,

You should be able to do this using the Time Series Visual Builder.

If you choose "gauge", then "panel options", you can specify "1" as your max value. Then in your gauge data settings, you can compute the dynamic ratio per table. Here's a screenshot of a similar setup:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/0/40f72a6607609b743542d3590e90543d3c7da576.png)

Hope that helps!

---

<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 7, 2018, 7:37am UTC](https://discuss.elastic.co/t/gauge-with-dynamic-maximum-value/130634/3 "2018-05-07T07:37:20Z")

</div>

Thanks it works! In older Kibana instead of Bucket Script I had to use Calculation Aggregation.

---

<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:** [June 4, 2018, 7:37am UTC](https://discuss.elastic.co/t/gauge-with-dynamic-maximum-value/130634/4 "2018-06-04T07:37:21Z")

</div>

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