# Creating pie with Integer as slice

**URL:** <https://discuss.elastic.co/t/creating-pie-with-integer-as-slice/202066>\
**Category:** Kibana\
**Created:** [October 2, 2019, 10:07pm UTC](https://discuss.elastic.co/t/creating-pie-with-integer-as-slice/202066 "2019-10-02T22:07:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loic\_M](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@Loic\_M](https://discuss.elastic.co/u/Loic_M)\
**Post date:** [October 2, 2019, 10:07pm UTC](https://discuss.elastic.co/t/creating-pie-with-integer-as-slice/202066/1 "2019-10-02T22:07:38Z")

</div>

Hello,

I have documents with the following structure:

"zInvoiceCount": 22,  
"zInvoicesSuccessful": 18,  
"zInvoicesFailed": 4,  
"zItemsCount": 14,  
"zItemSuccessful": 10,  
"zItemFailed": 4,  
"zDate": "2019-09-29T23:05:46.8341165+02:00"

"fileName": "Main",  
"zInvoiceCount": 18,  
"zInvoicesSuccessful": 14,  
"zInvoicesFailed": 4,  
"zItemsCount": 8,  
"zItemSuccessful": 5,  
"zItemFailed": 3,  
"zDate": "2019-09-30T23:04:22.6362476+02:00"

I fail to understand how I could create a pie chart that will show sum of zInvoiceFailed and zInvoiceSuccessful as slice.  
Could you help ?

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [October 4, 2019, 10:43am UTC](https://discuss.elastic.co/t/creating-pie-with-integer-as-slice/202066/2 "2019-10-04T10:43:32Z")

</div>

With the current format of your data you can't do that in a normal pie chart. But you should be able to achieve that in Canvas.

---

<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 1, 2019, 10:43am UTC](https://discuss.elastic.co/t/creating-pie-with-integer-as-slice/202066/3 "2019-11-01T10:43:42Z")

</div>

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