How to compare the sums of multiple columns?

Hi,

I have datasets like below.
{
count_A: 10,
count_B: 5
}
{
count_A: 20,
count_: 5
}

I would to create a Kibana pie chart that compares the sums of each columns.
In this case, 30 vs 10 for count_A and count_B like below.
image

May I know how I can realize this?

Regards,

It would probably make more sense to do this as a bar chart. Kibana pie charts let you pick a way to aggregate the data and the metric to show for the aggregations. You are looking at all the data as one aggregate and want to get the sum of 2 different fields in the data.

In a vertical bar chart, you can have multiple horizontal axes. You can make a bar chart where one axis is the sum of count_A and another axis is the sum of count_B. Here is a screenshot of how to set that up in Lens:

You can leave the "Horizontal axis" option blank to view all the data as one aggregate. Then select 2 different vertical axes as "sum" of the fields you want to see.

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