# Canvas when filter added the value turns to zero \[6.8\]

**URL:** <https://discuss.elastic.co/t/canvas-when-filter-added-the-value-turns-to-zero-6-8/208081>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [November 15, 2019, 1:23pm UTC](https://discuss.elastic.co/t/canvas-when-filter-added-the-value-turns-to-zero-6-8/208081 "2019-11-15T13:23:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SheetalRIL](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SheetalRIL](https://discuss.elastic.co/u/SheetalRIL)\
**Post date:** [November 15, 2019, 1:23pm UTC](https://discuss.elastic.co/t/canvas-when-filter-added-the-value-turns-to-zero-6-8/208081/1 "2019-11-15T13:23:09Z")

</div>

Hi I have tried to add a filter to one of my Canvas slides for the total dashboard but every value turns to zero as I select any of the values please provide me with a solution.  
On of the queries is :  
SELECT err from(select (a_100/b) as err from(select count(app) as b, count(err) as a from "dum_" where app is not null group by app)) where err \> 60  
The query for the filter was:  
SELECT app from "dum\*"  
But as soon as filter applied the values turn to zero

---

<div class="post-metadata">

**Author:** ![tims](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tims/32/46750_2.png) [@tims](https://discuss.elastic.co/u/tims)\
**Post date:** [November 15, 2019, 6:00pm UTC](https://discuss.elastic.co/t/canvas-when-filter-added-the-value-turns-to-zero-6-8/208081/2 "2019-11-15T18:00:07Z")

</div>

@SheetalRIL sometimes this could happen if you have a mismatch in how the field is processed by Elasticsearch. Can you post the entire expression for the element that returns no results as well as the expression for the dropdown filter?

---

<div class="post-metadata">

**Author:** ![SheetalRIL](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SheetalRIL](https://discuss.elastic.co/u/SheetalRIL)\
**Post date:** [November 18, 2019, 7:38am UTC](https://discuss.elastic.co/t/canvas-when-filter-added-the-value-turns-to-zero-6-8/208081/3 "2019-11-18T07:38:31Z")

</div>

```
https://github.com/jaeckanaquth/ELK.git

```

contains all the queries and json format used to create the queries in an apm

---

<div class="post-metadata">

**Author:** ![tims](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tims/32/46750_2.png) [@tims](https://discuss.elastic.co/u/tims)\
**Post date:** [November 18, 2019, 3:03pm UTC](https://discuss.elastic.co/t/canvas-when-filter-added-the-value-turns-to-zero-6-8/208081/4 "2019-11-18T15:03:56Z")

</div>

@SheetalRIL that looks like a private repo maybe, I don't have access to it. In any case, if you open the Expression editor in Canvas and just copy/paste the expression that may be enough to help.

---

<div class="post-metadata">

**Author:** ![SheetalRIL](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SheetalRIL](https://discuss.elastic.co/u/SheetalRIL)\
**Post date:** [November 19, 2019, 5:53am UTC](https://discuss.elastic.co/t/canvas-when-filter-added-the-value-turns-to-zero-6-8/208081/7 "2019-11-19T05:53:21Z")

</div>

Please try one more time I have made the repository public I have also uploaded the expression json.

---

<div class="post-metadata">

**Author:** ![tims](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tims/32/46750_2.png) [@tims](https://discuss.elastic.co/u/tims)\
**Post date:** [November 19, 2019, 1:56pm UTC](https://discuss.elastic.co/t/canvas-when-filter-added-the-value-turns-to-zero-6-8/208081/8 "2019-11-19T13:56:10Z")

</div>

@SheetalRIL the way you are doing the sub-selects in the query is not really supported. The dropdown filter needs access to the same "app" field on the index in order to filter correctly. Can you try and simplify the query to just `select count(app) as b, count(err) as a from "dum" where app is not null group by app` to see if the filter works?

---

<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:** [December 17, 2019, 1:56pm UTC](https://discuss.elastic.co/t/canvas-when-filter-added-the-value-turns-to-zero-6-8/208081/9 "2019-12-17T13:56:12Z")

</div>

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