# Changing Status Column in DataTable based on Condition

**URL:** https://discuss.elastic.co/t/changing-status-column-in-datatable-based-on-condition/146819
**Category:** Kibana
**Created:** [August 31, 2018, 7:22am UTC](https://discuss.elastic.co/t/changing-status-column-in-datatable-based-on-condition/146819 "2018-08-31T07:22:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![himadri.ganguly](https://avatars.discourse-cdn.com/v4/letter/h/c89c15/32.png) [@himadri.ganguly](https://discuss.elastic.co/u/himadri.ganguly)
#### Post date: [August 31, 2018, 7:22am UTC](https://discuss.elastic.co/t/changing-status-column-in-datatable-based-on-condition/146819/1 "2018-08-31T07:22:08Z")

</div>

Hi,

Need some help from the community as I very new to the ELK stack.

I am fetching data from mysql db using mysql-replicator of fluentd and pushing it to elasticsearch. And displaying the data in the kibana datatable and that is working fine but on my use case I need to add a data column which will be the status of four types **up** , **down** , **high utilisation** and **packet drop**.

There are columns in DB table which contains the **Status** column which contain string of two types **"up"** and **"down"** , **BW** which contains the bandwidth in Integer and **OutputRate** which contains Integer.

From that table data I have to calculate the last 60 data of status column and the find the following condition:-  
**1. up** - if all the last 60 data in **Status** column is up then it will show **up**  
**2. down** - if all the last 60 data in **Status** is down then it will show **down**  
**3. high utilisation** - if Outputrate \> BW \* 0.8 then it will show **high utilization**  
**4. packet drop** - if **15%** of the last 60 data in Status column is down then **packet drop**

Thanks to all in advance.

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [September 1, 2018, 3:12am UTC](https://discuss.elastic.co/t/changing-status-column-in-datatable-based-on-condition/146819/2 "2018-09-01T03:12:13Z")

</div>

This is not something you could do with the data table. I would suggest looking at the Visual Builder visualization which allows for conditionals - there are few ways you could represent what you're looking for. Additionally, take a look at [Canvas](http://canvas.elastic.co/).

---

<div class="post-metadata">

### Author: ![himadri.ganguly](https://avatars.discourse-cdn.com/v4/letter/h/c89c15/32.png) [@himadri.ganguly](https://discuss.elastic.co/u/himadri.ganguly)
#### Post date: [September 2, 2018, 8:39pm UTC](https://discuss.elastic.co/t/changing-status-column-in-datatable-based-on-condition/146819/3 "2018-09-02T20:39:53Z")

</div>

Thank you, buddy, for the reply.

But can you please guide me to get a tutorial or some material regarding my use-case to achieve the goal as I am struggling with it, for a few days and not getting proper tutorial on the internet.

As I am new to this stack some tutorial or a proper walk-through is really helpful.

Thank you 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: [September 30, 2018, 8:40pm UTC](https://discuss.elastic.co/t/changing-status-column-in-datatable-based-on-condition/146819/4 "2018-09-30T20:40:03Z")

</div>

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