# Group other and missing in Canvas piechart like in Normal Kibana view

**URL:** <https://discuss.elastic.co/t/group-other-and-missing-in-canvas-piechart-like-in-normal-kibana-view/200719>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [September 23, 2019, 3:28pm UTC](https://discuss.elastic.co/t/group-other-and-missing-in-canvas-piechart-like-in-normal-kibana-view/200719 "2019-09-23T15:28:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hans\_Kruse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hans_kruse/32/54739_2.png) [@Hans\_Kruse](https://discuss.elastic.co/u/Hans_Kruse)\
**Post date:** [September 23, 2019, 3:28pm UTC](https://discuss.elastic.co/t/group-other-and-missing-in-canvas-piechart-like-in-normal-kibana-view/200719/1 "2019-09-23T15:28:29Z")

</div>

In a normal Kibana PieChart(and many other views) you typically do a top N bucketizing. You have the option to show the percentage of missing and the number of results that fall outside the top N.

How do I do that with PIE charts in Canvas, using SQL. If I use LIMIT it will just give me the top N results?  
In the below query I exclude the missing and only get the top 5 results.  
I care less about the missing but I would like to group the missing ones in an "other" group.  
The Pie chart does not support that. But maybe Elastic SQL does?

```
SELECT Count(identifier) as count, 
from document.CountryName.keyword as Country
FROM "ourlogs-*"
WHERE Country is not null
group by Country
order by count DESC limit 5

```

Anyone has a suggestion on how to do that?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [September 25, 2019, 11:41am UTC](https://discuss.elastic.co/t/group-other-and-missing-in-canvas-piechart-like-in-normal-kibana-view/200719/2 "2019-09-25T11:41:11Z")

</div>

Hi @Hans_Kruse,

this is currently not possible. Regular Kibana visualizations get the "other" group by doing a second request which you can't really express with SQL.

However there is currently [work going on](https://github.com/elastic/kibana/pull/39839) (planned to be released with 7.5) to make it possible to embed regular visualizations into a Canvas workpad which would also solve this problem.

---

<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:** [October 23, 2019, 11:41am UTC](https://discuss.elastic.co/t/group-other-and-missing-in-canvas-piechart-like-in-normal-kibana-view/200719/3 "2019-10-23T11:41:12Z")

</div>

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