# Vertical Bar - Combine 'Normal' and 'Stacked' view

**URL:** https://discuss.elastic.co/t/vertical-bar-combine-normal-and-stacked-view/241137
**Category:** Kibana
**Created:** [July 14, 2020, 1:00pm UTC](https://discuss.elastic.co/t/vertical-bar-combine-normal-and-stacked-view/241137 "2020-07-14T13:00:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Barabossa](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@Barabossa](https://discuss.elastic.co/u/Barabossa)
#### Post date: [July 14, 2020, 1:00pm UTC](https://discuss.elastic.co/t/vertical-bar-combine-normal-and-stacked-view/241137/1 "2020-07-14T13:00:03Z")

</div>

Hi,

I'm working for a company that has a lot of mail servers. These mailservers send mail in packages (which we call 'slots'). Each single email gets logged as a record, and has a slot value.

In addition, each email record also has a value to indicate whether it was successful or whether it encountered an error. This field is called 'state', and a value of 1000 indicates the emails was sent successfully whereas all other values (900, 823, 455, ...) mean the email encountered a delivery problem.

I wanted to create a vertical bar chart, where a each bar indicates the number of successful emails per slot and the number of failed emails per slot; kind of like this:

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

However, it doesn't seem possible to define stacking behaviour for the states but 'normal' behaviour for the slots.

I'm fairly new at Kibana so any help would be appreciated.

Thank you,

Jon

---

<div class="post-metadata">

### Author: ![Barabossa](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@Barabossa](https://discuss.elastic.co/u/Barabossa)
#### Post date: [July 27, 2020, 9:43am UTC](https://discuss.elastic.co/t/vertical-bar-combine-normal-and-stacked-view/241137/2 "2020-07-27T09:43:22Z")

</div>

Anyone? ☹

---

<div class="post-metadata">

### Author: ![myasonik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/myasonik/32/62369_2.png) [@myasonik](https://discuss.elastic.co/u/myasonik)
#### Post date: [July 27, 2020, 4:01pm UTC](https://discuss.elastic.co/t/vertical-bar-combine-normal-and-stacked-view/241137/3 "2020-07-27T16:01:00Z")

</div>

Hi @Barabossa! Sorry your question didn't get any attention earlier, hopefully I can help some.

Stacked bar charts are certainly possible inside of Kibana. Here's a prior question that shows an example config: [Stacked and grouped columns in bar chart](https://discuss.elastic.co/t/stacked-and-grouped-columns-in-bar-chart/47907/2)

But I don't believe you'll be able to group it by state like you're looking to. I'd recommend creating a [Scripted Field](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html) to first group the states like you're looking to do then split on that field, instead of the raw state field.

---

<div class="post-metadata">

### Author: ![Barabossa](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@Barabossa](https://discuss.elastic.co/u/Barabossa)
#### Post date: [August 5, 2020, 9:36am UTC](https://discuss.elastic.co/t/vertical-bar-combine-normal-and-stacked-view/241137/4 "2020-08-05T09:36:51Z")

</div>

Thank you Michael. I don't think I have access to creating scripted fields in my role, but I'll see what I can get done.

---

<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: [September 2, 2020, 9:36am UTC](https://discuss.elastic.co/t/vertical-bar-combine-normal-and-stacked-view/241137/5 "2020-09-02T09:36:51Z")

</div>

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