# How to show pie chart based on different aggregations

**URL:** https://discuss.elastic.co/t/how-to-show-pie-chart-based-on-different-aggregations/152703
**Category:** Kibana
**Created:** [October 16, 2018, 6:10pm UTC](https://discuss.elastic.co/t/how-to-show-pie-chart-based-on-different-aggregations/152703 "2018-10-16T18:10:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nethaji](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nethaji/32/72803_2.png) [@Nethaji](https://discuss.elastic.co/u/Nethaji)
#### Post date: [October 16, 2018, 6:10pm UTC](https://discuss.elastic.co/t/how-to-show-pie-chart-based-on-different-aggregations/152703/1 "2018-10-16T18:10:00Z")

</div>

I have an doubt on creating pie chart based on different fields?

here the sample query that i'm used in mysql

#1.1 mpn count

select count(Licsensetype\_id) as MPNLicsensecount from tbl\_softwarelicenseinventory where Licsensetype\_id=1 and Year\_id=1;

#1.2 volume count

select count(Licsensetype\_id) as VolumeLicsensecount from tbl\_softwarelicenseinventory where Licsensetype\_id=2 and Year\_id=1;

here i have two fields to show my count for mpn and volume but in kibana i can't able to select two fields

because, based on the two fields i can able to get the count on mpn and volume

can u people please explain how to do this?

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/8/d8bb7e3fe3921d9278c55f7cc48120425575171e.jpeg)

---

<div class="post-metadata">

### Author: ![ronolives](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@ronolives](https://discuss.elastic.co/u/ronolives)
#### Post date: [October 16, 2018, 8:48pm UTC](https://discuss.elastic.co/t/how-to-show-pie-chart-based-on-different-aggregations/152703/2 "2018-10-16T20:48:30Z")

</div>

Hey, I am doing digital marketing work and for this I am responsible to sent result to client on different patters in which one is pie chart and I don't know how to create pie chart exactly. My company is working for [touch cleaning services Chicago](http://strategytouchcleaning.com/) and for this I have to submit reports and pie charts so may you tell me how to create this pie chart???

---

<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: [November 13, 2018, 8:48pm UTC](https://discuss.elastic.co/t/how-to-show-pie-chart-based-on-different-aggregations/152703/3 "2018-11-13T20:48:31Z")

</div>

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