# Two bars in vertical/horizontal chart

**URL:** <https://discuss.elastic.co/t/two-bars-in-vertical-horizontal-chart/282674>\
**Category:** Kibana\
**Created:** [August 27, 2021, 1:33pm UTC](https://discuss.elastic.co/t/two-bars-in-vertical-horizontal-chart/282674 "2021-08-27T13:33:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mzagrajek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mzagrajek/32/143470_2.png) [@mzagrajek](https://discuss.elastic.co/u/mzagrajek)\
**Post date:** [August 27, 2021, 1:33pm UTC](https://discuss.elastic.co/t/two-bars-in-vertical-horizontal-chart/282674/1 "2021-08-27T13:33:34Z")

</div>

Hi there  
I have problem with visualization.

What I want?

- vertical or horizontal chart
- one bar representing field with all products divided by some business unit: Y-axis will be count of those, X-axis the business units (that I can achieve)
- second bar would take count from the first bar and have filter NOT somefield: \*  
I cant achieve the second bar. They are just all melted into one bar and the result is of course good, but I would prefer one bar by another to see count of all product and the smaller one which has this filter, so something like that:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/e/be4371f402564b5d69dc055043f3cf9ff38b4fc8.png)

or that:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/3/f3000083a8df35935fafb1c63259f4fe13453a25.png)

I tried with splitting this:

- by chart NOT filter first
- by series by business unit here

And I always land with one bar per business unit.  
I achieved it with pie chart, but its non-readable in there:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/5/559860757b3eedfdd13b3b7ceae3b87d468b2785.png)

---

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [September 6, 2021, 2:49pm UTC](https://discuss.elastic.co/t/two-bars-in-vertical-horizontal-chart/282674/2 "2021-09-06T14:49:36Z")

</div>

Hi there, what version of Kibana are you using? In 7.14 we introduced Formula for Lens visualizations and it should help in your case.

---

<div class="post-metadata">

**Author:** ![mzagrajek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mzagrajek/32/143470_2.png) [@mzagrajek](https://discuss.elastic.co/u/mzagrajek)\
**Post date:** [September 7, 2021, 5:07pm UTC](https://discuss.elastic.co/t/two-bars-in-vertical-horizontal-chart/282674/3 "2021-09-07T17:07:25Z")

</div>

Hi Marta, We are using 7.1.1. We want to upgrade to 7.14 by the end of the year 🙂 Can I see this in trial cloud of elasticsearch?

---

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [September 8, 2021, 8:31pm UTC](https://discuss.elastic.co/t/two-bars-in-vertical-horizontal-chart/282674/4 "2021-09-08T20:31:47Z")

</div>

Yes, you could see this in cloud trial, but there might be also a solution for you for the version you're currently on. I am not 100% sure I understand the goal, but maybe it will help. In Visualize Vertical Bar,I created two bars with filters aggregation on x-Axis and then split series with terms aggregation.  
I have two filters: '\*' (all records, first bar) and 'category.keyword: Women's category' (second bar)

 ![Screenshot 2021-09-08 at 22.29.04](https://us1.discourse-cdn.com/elastic/original/3X/f/7/f7b65b52813b745144659390639851d4c084e03f.png)

Let me know if this is close to what you wanted to achieve.

Screenshot of configuration:

 ![Screenshot 2021-09-08 at 22.31.41](https://us1.discourse-cdn.com/elastic/original/3X/9/a/9a8c20b02066f0f2cbc58db2c49a9b6d0dea872c.png)

---

<div class="post-metadata">

**Author:** ![mzagrajek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mzagrajek/32/143470_2.png) [@mzagrajek](https://discuss.elastic.co/u/mzagrajek)\
**Post date:** [September 13, 2021, 12:58pm UTC](https://discuss.elastic.co/t/two-bars-in-vertical-horizontal-chart/282674/5 "2021-09-13T12:58:45Z")

</div>

Hi Marta, unfortunately not. I tried that, It just create me one column. Because the split series I use filters.

---

<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:** [October 11, 2021, 12:58pm UTC](https://discuss.elastic.co/t/two-bars-in-vertical-horizontal-chart/282674/6 "2021-10-11T12:58:56Z")

</div>

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