# Using groups in Histogram

**URL:** https://discuss.elastic.co/t/using-groups-in-histogram/37267
**Category:** Kibana
**Created:** [December 15, 2015, 5:09pm UTC](https://discuss.elastic.co/t/using-groups-in-histogram/37267 "2015-12-15T17:09:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![chinmoyd](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chinmoyd](https://discuss.elastic.co/u/chinmoyd)
#### Post date: [December 15, 2015, 5:09pm UTC](https://discuss.elastic.co/t/using-groups-in-histogram/37267/1 "2015-12-15T17:09:12Z")

</div>

I have the following fields in my Kibana Index pattern for a financial transaction application:  
Transaction Id, Transaction Type, Response Code, Datetime

I want to display a histogram, where the X-axis will be the dates, in Y axis, I want to display the counts of different Response Codes. For example, If for a day, the response code counts are as below:  
00 -- 1  
E1 -- 3  
E2 -- 4

The bar on that day will have three divisions, with a total height of 8(1+3+4), having three divisions, having height 1 for 00, 3 for E1, 4 for E2.

Can you please suggest how can I create such a visualization in Kibana?

---

<div class="post-metadata">

### Author: ![chinmoyd](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chinmoyd](https://discuss.elastic.co/u/chinmoyd)
#### Post date: [December 17, 2015, 4:15am UTC](https://discuss.elastic.co/t/using-groups-in-histogram/37267/2 "2015-12-17T04:15:37Z")

</div>

Dear Kibana experts, any clue on a possible solution to get such a grouped histogram?

---

<div class="post-metadata">

### Author: ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)
#### Post date: [December 18, 2015, 7:46pm UTC](https://discuss.elastic.co/t/using-groups-in-histogram/37267/3 "2015-12-18T19:46:54Z")

</div>

This can be made using the vertical bar chart visualization. On the y-axis we want count, on the x-axis we want a date histogram aggregation on our date field, and a terms sub-aggregation on our response code field.  
It might look something like:

 ![](https://us1.discourse-cdn.com/elastic/original/2X/4/41a2a79c7602226b3a686bc2507db5252272a7e0.png)

---

<div class="post-metadata">

### Author: ![chinmoyd](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chinmoyd](https://discuss.elastic.co/u/chinmoyd)
#### Post date: [December 20, 2015, 5:25pm UTC](https://discuss.elastic.co/t/using-groups-in-histogram/37267/4 "2015-12-20T17:25:51Z")

</div>

Thanks a lot!

---

<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: [July 6, 2017, 2:06pm UTC](https://discuss.elastic.co/t/using-groups-in-histogram/37267/5 "2017-07-06T14:06:13Z")

</div>


