# How to use divide() function with field

**URL:** <https://discuss.elastic.co/t/how-to-use-divide-function-with-field/352534>\
**Category:** Kibana\
**Created:** [February 5, 2024, 12:35pm UTC](https://discuss.elastic.co/t/how-to-use-divide-function-with-field/352534 "2024-02-05T12:35:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [February 5, 2024, 12:35pm UTC](https://discuss.elastic.co/t/how-to-use-divide-function-with-field/352534/1 "2024-02-05T12:35:38Z")

</div>

Hey there,  
I was trying to divide the value of a specific field but I cannot do that since I am facing the error "The operation divide does not accept any field as argument".  
My field contains only numbers but I cannot find any way to do that even using Lens or TSVB (Math aggregation is disabled, don't know why).

I am using Elastic stack 8.8.1

---

<div class="post-metadata">

**Author:** ![RLPowellJr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rlpowelljr/32/97049_2.png) [@RLPowellJr](https://discuss.elastic.co/u/RLPowellJr)\
**Post date:** [February 5, 2024, 1:48pm UTC](https://discuss.elastic.co/t/how-to-use-divide-function-with-field/352534/2 "2024-02-05T13:48:32Z")

</div>

What is the field type? You say it contains only numbers, but those could be represented by a numeric type (such as integer) or as a string field, such as text. I don't think you'll be able to do the divide (in a runtime field?) on a non-numeric field.

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [February 5, 2024, 1:51pm UTC](https://discuss.elastic.co/t/how-to-use-divide-function-with-field/352534/3 "2024-02-05T13:51:06Z")

</div>

my field is mapped as `long`

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [February 13, 2024, 4:46pm UTC](https://discuss.elastic.co/t/how-to-use-divide-function-with-field/352534/4 "2024-02-13T16:46:25Z")

</div>

no solutions?

---

<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:** [March 12, 2024, 4:46pm UTC](https://discuss.elastic.co/t/how-to-use-divide-function-with-field/352534/5 "2024-03-12T16:46:49Z")

</div>

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