# Gauge Min-Max as context variable

**URL:** <https://forums.losant.com/t/gauge-min-max-as-context-variable/3689>\
**Category:** Feature Request\
**Created:** [March 26, 2021, 2:28pm UTC](https://forums.losant.com/t/gauge-min-max-as-context-variable/3689 "2021-03-26T14:28:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [March 26, 2021, 2:28pm UTC](https://forums.losant.com/t/gauge-min-max-as-context-variable/3689/1 "2021-03-26T14:28:05Z")

</div>

Would be nice to set the Min/Max range for the Gauge Dial with context variables.

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [March 26, 2021, 2:56pm UTC](https://forums.losant.com/t/gauge-min-max-as-context-variable/3689/3 "2021-03-26T14:56:28Z")

</div>

@Lars_Andersson, you actually can use context variables in those spots; however, when validating the input of the gauge min and max values, we resolve the templates you insert there against the currently set dashboard context.

For example, assuming you have:

- A number variable called “min” whose current value is 0
- A number variable called “max” whose current value is 100

You can define the gauge min and max values as `{{ctx.min}}` and `{{ctx.max}}` respectively.

But these cases would fail:

- Referencing a context variable that does not exist
- Referencing a non-number context variable
- Referencing context variables whose current values resolve to a min greater than the max, or a max greater than the min
