I have my data in Elasticsearch like below
I'm trying to create a pie chart in kibana which shows the percentage of people who visited both UK and India and % of people who visited only India and % percentage of people who visited only UK.
But I'm not able to find a way to group by person name and do filter on the country visited in the pie chart in kibana. Any way to do this?
Asked
Active
Viewed 3,075 times
2

Manoj kumar
- 227
- 6
- 19
-
put sample configuration which you done or try till now. – Sagar Patel Feb 09 '22 at 12:13
-
@SagarPatel I'm new to this kibana.. i couldn't see any option to get this kind of chart in kibana.. hence posted to know if there is anyway to do this – Manoj kumar Feb 09 '22 at 13:38
1 Answers
0
I believe you are looking for filterAggregation : Filter Aggregation Effectively it enables aggregation on different filters.
Add this as a second aggregation(split slice) after the Persons Aggregation.
If you are just interested in count and Not counts per person, just leverage Filter Aggregation with respective filters which will give you the percentages per filter.

Rambler
- 4,994
- 2
- 20
- 27
-
In filter aggregation I'm only able to filter based on single record.. if u see the sample data, they are separate records which needs to be grouped by name to get the list of countries the person visited.. that grouping option seems not available in the filter aggregation. And also i need the % of people in the chart – Manoj kumar Feb 10 '22 at 10:02