# Machine Learning detecting highest change of a value

**URL:** <https://discuss.elastic.co/t/machine-learning-detecting-highest-change-of-a-value/171102>\
**Category:** Kibana\
**Tags:** elastic-stack-machine-learning\
**Created:** [March 6, 2019, 11:44am UTC](https://discuss.elastic.co/t/machine-learning-detecting-highest-change-of-a-value/171102 "2019-03-06T11:44:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [March 6, 2019, 12:02pm UTC](https://discuss.elastic.co/t/machine-learning-detecting-highest-change-of-a-value/171102/2 "2019-03-06T12:02:31Z")

</div>

You cannot combine detectors like this. However, you can create a [scripted field](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-script-fields.html) that calculates the difference on the fly (and name that field `delta` for example) and then use ML (i.e. `max(delta)`) on that new field

Example: [ML Job on Scripted field](https://discuss.elastic.co/t/ml-job-on-scripted-field/116820)

---

_[View the full topic](https://discuss.elastic.co/t/machine-learning-detecting-highest-change-of-a-value/171102)._
