# To display only selected fields in kibana

**URL:** <https://discuss.elastic.co/t/to-display-only-selected-fields-in-kibana/224410>\
**Category:** Kibana\
**Created:** [March 20, 2020, 11:52am UTC](https://discuss.elastic.co/t/to-display-only-selected-fields-in-kibana/224410 "2020-03-20T11:52:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amanpradhan07](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@amanpradhan07](https://discuss.elastic.co/u/amanpradhan07)\
**Post date:** [March 20, 2020, 11:52am UTC](https://discuss.elastic.co/t/to-display-only-selected-fields-in-kibana/224410/1 "2020-03-20T11:52:57Z")

</div>

Hello everyone,  
I want to make pie chart of some fields in my visualization.but when i select a field.keyword it displays all the values..  
For example i select biller.keyword-  
Then it displays all the billers in pie chart.  
I have another field called status code - which has 4 distinct values -200,404,503..  
What i want is to show only those billers who has status code value 200 50% more than other..  
Like if a biller has 100 hits out of them 200 status code count were 60 so this is more than 50% so i want to show this  
But if a biller has 100 count nd status code 200 is only 10 out of 100 i do not want to show that biller in my pie chart..  
How to achieve this..  
Basically i want to use average filter on terms in visualization...  
Thanks in advance 🙂  
Stay safe...

---

<div class="post-metadata">

**Author:** ![lukeelmers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukeelmers/32/35230_2.png) [@lukeelmers](https://discuss.elastic.co/u/lukeelmers)\
**Post date:** [March 20, 2020, 11:03pm UTC](https://discuss.elastic.co/t/to-display-only-selected-fields-in-kibana/224410/2 "2020-03-20T23:03:00Z")

</div>

Hi @amanpradhan07,

> I want to make pie chart of some fields in my visualization.but when i select a field.keyword it displays all the values..  
> For example i select biller.keyword-  
> Then it displays all the billers in pie chart.

For this case you'll want to select Buckets \> Split slices, and do a Terms aggregation on your `biller.keyword`. That should show you one pie chart broken down by biller for the selected time range.

> What i want is to show only those billers who has status code value 200 50% more than other..

For this case I'm not sure there's a way to do exactly what you're looking for in a pie chart without [bucket script aggregations](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-bucket-script-aggregation.html), which unfortunately are not yet supported in Kibana's core visualizations. (There is some support for them in TSVB however, if you are open to using a different type of visualization other than a pie. Here's an example: [Weighted Average in a DataTable of Kibana - #2 by cjcenizal](https://discuss.elastic.co/t/weighted-average-in-a-datatable-of-kibana/185909/2))

Bucket script aggregations let you define a custom metric by using a script to perform per-bucket computations. So in your case, you could look at the total status code 200 counts per-biller, and then compute if it exceeds the total status code counts for that bucket.

If you're interested, you can follow along with [the relevant Github issue](https://github.com/elastic/kibana/issues/4707) to be notified of any updates related to the development of this feature. There's also lots of interesting discussion on the topic there; certainly worth reading through to get some more background.

---

<div class="post-metadata">

**Author:** ![amanpradhan07](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@amanpradhan07](https://discuss.elastic.co/u/amanpradhan07)\
**Post date:** [March 23, 2020, 5:24am UTC](https://discuss.elastic.co/t/to-display-only-selected-fields-in-kibana/224410/3 "2020-03-23T05:24:44Z")

</div>

okay @lukeelmers thank you so much for your answer!!  
I will have a look on weighted average in DataTable.  
If it is useful in my case.

---

<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:** [April 20, 2020, 5:24am UTC](https://discuss.elastic.co/t/to-display-only-selected-fields-in-kibana/224410/4 "2020-04-20T05:24:54Z")

</div>

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