# Canvas use of Gauge and drop down menus

**URL:** https://discuss.elastic.co/t/canvas-use-of-gauge-and-drop-down-menus/361858
**Category:** Kibana
**Tags:** canvas
**Created:** [June 21, 2024, 3:51pm UTC](https://discuss.elastic.co/t/canvas-use-of-gauge-and-drop-down-menus/361858 "2024-06-21T15:51:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Mang0](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mang0/32/135845_2.png) [@Mang0](https://discuss.elastic.co/u/Mang0)
#### Post date: [June 21, 2024, 3:51pm UTC](https://discuss.elastic.co/t/canvas-use-of-gauge-and-drop-down-menus/361858/1 "2024-06-21T15:51:31Z")

</div>

Hi !  
I'm trying to use a gauge combined with a Drop-down Filter in Kibana Canvas Workpad.  
Both the drop down and the gauge work perfectly separately : i can update some meters with my drop down filter, and my gauge has the right percentage when nothing is selected inside the drop down filter.

However, my problem appears when I try to use both together: apparently the change in the drop down menu only affect the nominator (my first essql query) and not the denominator of the gauge.

**How can I force the application of the filter also on the denominator ?**

```auto
kibana
| selectFilter
| essql 
  query="SELECT count(se) as Operationals FROM \"status-*\" WHERE (serviceStatus = 'IN_SERVICE' OR serviceStatus = 'SUSPENDED')
  AND NOT manualStatus ='FREEZE' AND (generalStatus= 'Available' OR generalStatus='Occupied') AND \"@timestamp\" >= NOW() - INTERVAL 15 MINUTE"
| math {string "Operationals /" {filters | essql query="SELECT count(se) as Parc FROM \"status-*\" WHERE (serviceStatus = 'IN_SERVICE' OR serviceStatus = 'SUSPENDED')
  AND not manualStatus ='FREEZE' AND \"@timestamp\" >= NOW() - INTERVAL 15 MINUTE" | math " Parc"}}
| progress shape="gauge" label={formatnumber "0.000%"} 
  font={font size=24 family="'Open Sans', Helvetica, Arial, sans-serif" color="#000000" align="center"}
| render

```

I already tried to force the filter with group = "dropdownfilter1" after "SelectFilter" at the beginning and after "filters" inside my math expression and the only thing I succeeded at was to block all influence the drop down filter has on my gauge which is a really sad solution...

If anyone has an idea, thanks for the help !

---

<div class="post-metadata">

### Author: ![Mang0](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mang0/32/135845_2.png) [@Mang0](https://discuss.elastic.co/u/Mang0)
#### Post date: [June 24, 2024, 10:37am UTC](https://discuss.elastic.co/t/canvas-use-of-gauge-and-drop-down-menus/361858/2 "2024-06-24T10:37:38Z")

</div>

I found a solution ! If anyone has the same problem as me here is how I solved it :

```auto
kibana
| selectFilter 
| var_set name="Ope" value={essql "SELECT count(se) as Ope FROM \"status-*\" WHERE (serviceStatus = 'IN_SERVICE' OR serviceStatus = 'SUSPENDED')
  AND NOT manualStatus ='FREEZE' AND (generalStatus= 'Available' OR generalStatus='Occupied') AND \"@timestamp\" >= NOW() - INTERVAL 15 MINUTE"}
| var_set name="Parc" value={essql "SELECT count(se) as Parc FROM \"status-*\" WHERE (serviceStatus = 'IN_SERVICE' OR serviceStatus = 'SUSPENDED')
  AND not manualStatus ='FREEZE' AND \"@timestamp\" >= NOW() - INTERVAL 15 MINUTE"}
| createTable ids="totalA" ids="totalB"
| staticColumn name="totalA" value={var "Ope" | getCell "Ope"}
| alterColumn column="totalA" type="number"
| staticColumn name="totalB" value={var "Parc" | getCell "Parc"}
| alterColumn column="totalB" type="number"
| mathColumn id="percent" name="percent" expression="totalA / totalB"
| math "percent"
| progress shape="gauge" label={formatnumber "0.000%"} 
  font={font size=24 family="'Open Sans', Helvetica, Arial, sans-serif" color="#000000" align="center"}
| render

```

When creating variables apparently the filter is really applied (and not when adding an Essql query as I did in the first place)
