# Maximum of values as data point in Kibana 4

**URL:** https://discuss.elastic.co/t/maximum-of-values-as-data-point-in-kibana-4/31323
**Category:** Kibana
**Created:** [September 29, 2015, 10:16am UTC](https://discuss.elastic.co/t/maximum-of-values-as-data-point-in-kibana-4/31323 "2015-09-29T10:16:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![QuantumDamage](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/quantumdamage/32/5062_2.png) [@QuantumDamage](https://discuss.elastic.co/u/QuantumDamage)
#### Post date: [September 29, 2015, 10:16am UTC](https://discuss.elastic.co/t/maximum-of-values-as-data-point-in-kibana-4/31323/1 "2015-09-29T10:16:14Z")

</div>

Hi,  
I posted this problem on [SO](http://stackoverflow.com/questions/29743504/maximum-of-values-as-data-point-in-kibana-4) some time ago. Now I'm not even sure if it is solvable with Kibana. Here it is:

I have area chart which is representing build time for various jobs  
from our Jenkins. There are some jobs that are running in parallel, and  
when last of them is completed other build is triggered.

Example:

"JobType1" triggers "JobType2", "JobType3", "JobType4". When last from 2,3,4 will complete, "JobType5" is triggered.

I know how to stack duration data from "JobType1" and "JobType5" and I  
would like to put maximum of "JobType2", "JobType3", "JobType4" as  
single value between them.

How to do that?

---

<div class="post-metadata">

### Author: ![Pieter\_Agenbag](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pieter_agenbag/32/4562_2.png) [@Pieter\_Agenbag](https://discuss.elastic.co/u/Pieter_Agenbag)
#### Post date: [October 1, 2015, 7:56am UTC](https://discuss.elastic.co/t/maximum-of-values-as-data-point-in-kibana-4/31323/2 "2015-10-01T07:56:12Z")

</div>

I think the only way to do that is to add a scripted field to your index...

```
Kibana:Settings:Indices:Scripted Fields

```

And add something like : `max(max(doc['JobType2'].value,doc[JobType3'].value),doc['JobType4'].value)`

---

<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:12pm UTC](https://discuss.elastic.co/t/maximum-of-values-as-data-point-in-kibana-4/31323/3 "2017-07-06T14:12:09Z")

</div>


