# Kibana filter with math functions

**URL:** <https://discuss.elastic.co/t/kibana-filter-with-math-functions/223410>\
**Category:** Kibana\
**Created:** [March 12, 2020, 8:26pm UTC](https://discuss.elastic.co/t/kibana-filter-with-math-functions/223410 "2020-03-12T20:26:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtudisco](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mtudisco](https://discuss.elastic.co/u/mtudisco)\
**Post date:** [March 12, 2020, 8:26pm UTC](https://discuss.elastic.co/t/kibana-filter-with-math-functions/223410/1 "2020-03-12T20:26:54Z")

</div>

HI,  
Is there any way to write a filter in Lucene with math functions?  
in my documments i have filed max\_value and actual\_value, and i would like to filter all documents where max\_value\*0.95\<actual\_value

I dont want to create a scripted field as it would affect other queries and display of information.

thanks

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [March 13, 2020, 12:43am UTC](https://discuss.elastic.co/t/kibana-filter-with-math-functions/223410/2 "2020-03-13T00:43:53Z")

</div>

Hello,  
There is no way do that sadly.  
The scripted field sounds like the only way to achieve that. You could also look into percentiles, but that will only give you aggregated data, not a filter of documents.

---

<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:** [April 10, 2020, 12:43am UTC](https://discuss.elastic.co/t/kibana-filter-with-math-functions/223410/3 "2020-04-10T00:43:54Z")

</div>

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