# How to create a custom field in data-table

**URL:** https://discuss.elastic.co/t/how-to-create-a-custom-field-in-data-table/105654
**Category:** Kibana
**Created:** [October 29, 2017, 6:48am UTC](https://discuss.elastic.co/t/how-to-create-a-custom-field-in-data-table/105654 "2017-10-29T06:48:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![s\_fm](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@s\_fm](https://discuss.elastic.co/u/s_fm)
#### Post date: [October 29, 2017, 6:48am UTC](https://discuss.elastic.co/t/how-to-create-a-custom-field-in-data-table/105654/1 "2017-10-29T06:48:56Z")

</div>

i want to have a custom column in data-table visualization that counts a field with special value in that row, forexample count of postbacks that are 1, how can i do this?

---

<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: [October 30, 2017, 8:53pm UTC](https://discuss.elastic.co/t/how-to-create-a-custom-field-in-data-table/105654/2 "2017-10-30T20:53:44Z")

</div>

It sounds like you want a scripted metric aggregation which unfortunately isn't in kibana yet - [https://github.com/elastic/kibana/issues/2646](https://github.com/elastic/kibana/issues/2646). If you can calculate this off other fields in your document (i.e. assuming you don't need to crunch this off the total bucket) you can create a [scripted field](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html) and perform a metric aggregation on it.

---

<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: [November 27, 2017, 9:06pm UTC](https://discuss.elastic.co/t/how-to-create-a-custom-field-in-data-table/105654/3 "2017-11-27T21:06:44Z")

</div>

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