# Tabulating data based on a field

**URL:** <https://discuss.elastic.co/t/tabulating-data-based-on-a-field/64900>\
**Category:** Kibana\
**Created:** [November 3, 2016, 4:02pm UTC](https://discuss.elastic.co/t/tabulating-data-based-on-a-field/64900 "2016-11-03T16:02:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cylindric](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cylindric/32/5660_2.png) [@Cylindric](https://discuss.elastic.co/u/Cylindric)\
**Post date:** [November 3, 2016, 4:02pm UTC](https://discuss.elastic.co/t/tabulating-data-based-on-a-field/64900/1 "2016-11-03T16:02:15Z")

</div>

Hi folks. I'm trying to reproduce a dashboard, so I can move us off a 3rd-party product onto ElasticSearch and Kibana.

One visualisation I'm having trouble with is a table, with totals depending on a record status.

Here's an example. We have a bunch of record that has on it a "type" which might be a customer for example "alice", "bob", "charles". It also 'message.status' which might be "okay" or "failed".

Each type will have many records, with any of the statuses.

I'd like to have a table such as:

```
Type Count Okay Failed
---------------------------------
Alice 10 10 0
Bob 234 230 4
Charles 91 5 96

```

I can get the numbers by splitting the table by the term "status", but then I end up with a bunch of tables, not one table. Is there a way of doing that sort of crosstabulation?

ElasticSearch 2.4.1  
Kibana 4.6.1

---

<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:** [November 3, 2016, 7:53pm UTC](https://discuss.elastic.co/t/tabulating-data-based-on-a-field/64900/2 "2016-11-03T19:53:53Z")

</div>

It isn't possible to do that with the data table currently. Instead of doing split tables, you could do split rows to keep it in all in one table. The fields okay and failed will become row data instead of column data, but the information you're looking for should be available. There's an enhancement request [here](https://github.com/elastic/kibana/issues/3620).

---

<div class="post-metadata">

**Author:** ![Cylindric](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cylindric/32/5660_2.png) [@Cylindric](https://discuss.elastic.co/u/Cylindric)\
**Post date:** [November 4, 2016, 9:43am UTC](https://discuss.elastic.co/t/tabulating-data-based-on-a-field/64900/3 "2016-11-04T09:43:28Z")

</div>

Thanks. At least I know not to waste time trying to get it working. I can probably get the data presented nicely in other ways - I'm hoping my colleague will tell me that most of the columns aren't needed. At the moment it's worse than my example above, as he gets name, total, and then subtotal "okay" and subtotal "failed", and also "okay %" and "failed %".

We'll get there 🙂 The cost of the service we'll be cancelling more than pays for an Elastic Cloud setup.

---

<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, 1:34pm UTC](https://discuss.elastic.co/t/tabulating-data-based-on-a-field/64900/4 "2017-07-06T13:34:32Z")

</div>


