# Avoid exclamation error on Canvas Visual Element when row is zero

**URL:** <https://discuss.elastic.co/t/avoid-exclamation-error-on-canvas-visual-element-when-row-is-zero/295105>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [January 22, 2022, 3:10am UTC](https://discuss.elastic.co/t/avoid-exclamation-error-on-canvas-visual-element-when-row-is-zero/295105 "2022-01-22T03:10:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)\
**Post date:** [January 22, 2022, 3:10am UTC](https://discuss.elastic.co/t/avoid-exclamation-error-on-canvas-visual-element-when-row-is-zero/295105/1 "2022-01-22T03:10:58Z")

</div>

Hi Guys,

I have a DropDownFilter controlling two sets of Gauges for two sets of data. At times the filter would not return any data and i get an error - Empty Table. Is there a way to handle this failure in a nice way without the visual exclamation mark ? Hide the gauge when the row count is zero for example?

![Screen Shot 2022-01-22 at 3.15.33 AM](https://us1.discourse-cdn.com/elastic/original/3X/5/4/544898e8219d7af0cfece8e66e26639940919dad.png)

 ![Screen Shot 2022-01-22 at 4.02.15 AM](https://us1.discourse-cdn.com/elastic/original/3X/7/6/76233361303cb3fdaefbdad68923401b4d80e47d.png)

 ![Screen Shot 2022-01-22 at 4.18.26 AM](https://us1.discourse-cdn.com/elastic/original/3X/3/0/302712a1e51e08d7f5b6ee8d2626cd1be990a1cf.png)

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [January 22, 2022, 9:54am UTC](https://discuss.elastic.co/t/avoid-exclamation-error-on-canvas-visual-element-when-row-is-zero/295105/2 "2022-01-22T09:54:12Z")

</div>

If you add `onError` parameter to math, such as `math "mean(percent_uptime)" onError="zero"` , the guage will be 0% on error. Though I'm not sure whether it is possible or not, I couldn't find the way to hide guage on error.

> **[Canvas function reference | Kibana Guide \[7.16\] | Elastic](https://www.elastic.co/guide/en/kibana/current/canvas-function-reference.html#math_fn)**
>
> Add interactive capabilities to your dashboard, such as controls that allow you to apply dashboard-level filters, and drilldowns that allow you to navigate to other dashboards and external websites.

---

<div class="post-metadata">

**Author:** ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)\
**Post date:** [January 22, 2022, 11:31am UTC](https://discuss.elastic.co/t/avoid-exclamation-error-on-canvas-visual-element-when-row-is-zero/295105/3 "2022-01-22T11:31:29Z")

</div>

What a champ !

 ![Screen Shot 2022-01-22 at 12.28.48 PM](https://us1.discourse-cdn.com/elastic/original/3X/1/7/172e39f721ac8180c12be253ae618c277dc30459.png)

This works for me with the zero

---

<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:** [February 19, 2022, 11:31am UTC](https://discuss.elastic.co/t/avoid-exclamation-error-on-canvas-visual-element-when-row-is-zero/295105/4 "2022-02-19T11:31:51Z")

</div>

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