To display only selected fields in kibana

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 :slightly_smiling_face:
Stay safe...

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, 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)

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 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.

1 Like

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.