# I am un able to get any result by using divide operator in Kibana 4.3

**URL:** https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405
**Category:** Kibana
**Created:** [March 3, 2016, 3:25pm UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405 "2016-03-03T15:25:41Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![mrizwan](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@mrizwan](https://discuss.elastic.co/u/mrizwan)
#### Post date: [March 3, 2016, 3:25pm UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/1 "2016-03-03T15:25:41Z")

</div>

My divide operator is not working  
I am doing this :

doc['total calls offered'].value/doc['total calls abandon'].value

However,  
I am getting result by using add (+) operator

doc['total calls offered'].value+doc['total calls abandon'].value

Please guide.

---

<div class="post-metadata">

### Author: ![Court](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/court/32/6640_2.png) [@Court](https://discuss.elastic.co/u/Court)
#### Post date: [March 3, 2016, 3:46pm UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/2 "2016-03-03T15:46:11Z")

</div>

I'm not 100% on this, but I don't believe lucene query syntax supports arithmetic. I think the + operator is just an alias of AND.

---

<div class="post-metadata">

### Author: ![mrizwan](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@mrizwan](https://discuss.elastic.co/u/mrizwan)
#### Post date: [March 3, 2016, 3:54pm UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/3 "2016-03-03T15:54:58Z")

</div>

but in Kibana, they have mentioned that we can use / operator . And + operator is adding my values not concatenating them.

---

<div class="post-metadata">

### Author: ![Court](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/court/32/6640_2.png) [@Court](https://discuss.elastic.co/u/Court)
#### Post date: [March 3, 2016, 3:57pm UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/4 "2016-03-03T15:57:38Z")

</div>

I may have misunderstood your issue: are you doing this in a scripted field?

---

<div class="post-metadata">

### Author: ![mrizwan](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@mrizwan](https://discuss.elastic.co/u/mrizwan)
#### Post date: [March 4, 2016, 8:22am UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/5 "2016-03-04T08:22:58Z")

</div>

yes i want to make a scripted field.

---

<div class="post-metadata">

### Author: ![BigFunger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigfunger/32/7323_2.png) [@BigFunger](https://discuss.elastic.co/u/BigFunger)
#### Post date: [March 4, 2016, 5:39pm UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/6 "2016-03-04T17:39:47Z")

</div>

I was able to index some records and create the specified scripted field (see below). How are the fields that you are trying to use mapped in your elasticsearch index?

 ![](https://us1.discourse-cdn.com/elastic/original/2X/1/13cd58ae002cdc618e3e0ee89b29fc0676015201.png)

 ![](https://us1.discourse-cdn.com/elastic/original/2X/a/a4845143773ad977185a6bdd8cdf0b51e8239f4d.png)

---

<div class="post-metadata">

### Author: ![mrizwan](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@mrizwan](https://discuss.elastic.co/u/mrizwan)
#### Post date: [March 7, 2016, 1:33pm UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/7 "2016-03-07T13:33:23Z")

</div>

I have tried as you showed in your example but I am getting errors while making visualizations.

Their data type is long PFB the mapping:

"Total Calls Abandon": {  
"type": "long"  
},  
"Total Calls Offered": {  
"type": "long"

---

<div class="post-metadata">

### Author: ![mrizwan](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@mrizwan](https://discuss.elastic.co/u/mrizwan)
#### Post date: [March 7, 2016, 1:34pm UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/8 "2016-03-07T13:34:57Z")

</div>

and i am using this script in kibana

doc['Total Calls Abandon']/doc['Total Calls Offered'] this is giving me error.

and doc['Total Calls Abandon'].value/doc['Total Calls Offered'].value is giving me blank visualization.

---

<div class="post-metadata">

### Author: ![BigFunger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigfunger/32/7323_2.png) [@BigFunger](https://discuss.elastic.co/u/BigFunger)
#### Post date: [March 7, 2016, 4:21pm UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/9 "2016-03-07T16:21:58Z")

</div>

The only thing that I see was different between my example and yours was that you had spaces in the your field names. I Recreated it the best that I could with the information that I have and was still unable to replicate the issue. Here is my mapping:

```auto
{
  "funger2": {
    "mappings": {
      "calls": {
        "properties": {
          "@timestamp": {
            "type": "date",
            "format": "strict_date_optional_time||epoch_millis"
          },
          "total calls abandon": {
            "type": "long"
          },
          "total calls offered": {
            "type": "long"
          }
        }
      }
    }
  }
}

```

I WAS able to get an error message to happen if I didn't type the fields name exactly **including case** when building my scripted field.

Can you please supply your mapping, and a sample of data so that I can recreate it better? Also, what exactly is the error message that you are receiving?

---

<div class="post-metadata">

### Author: ![mrizwan](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@mrizwan](https://discuss.elastic.co/u/mrizwan)
#### Post date: [March 8, 2016, 9:21am UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/10 "2016-03-08T09:21:25Z")

</div>

Jim thanks for ur reply. Below is the overall mapping and attached are the snapshots for reference. ![](https://us1.discourse-cdn.com/elastic/original/2X/e/e04e4e79400fab013fc9cff90f306d7959612a70.png)

 ![](https://us1.discourse-cdn.com/elastic/original/2X/2/2ff0c597217764914bc14803e2e7a3cddfc507af.png)  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/c/c43be32b4e2b9671e9ab6901099bfbe846a6a235.png)  
{  
"cc\_stats": {  
"mappings": {  
"ccstats\_report": {  
"properties": {  
"Call Date": {  
"type": "date",  
"format": "dateOptionalTime"  
},  
"Total Calls Abandon": {  
"type": "long"  
},  
"Total Calls Answered": {  
"type": "long"  
},  
"Total Calls Initiated": {  
"type": "long"  
},  
"Total Calls Offered": {  
"type": "long"  
}  
}  
}  
}  
}  
}

---

<div class="post-metadata">

### Author: ![BigFunger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigfunger/32/7323_2.png) [@BigFunger](https://discuss.elastic.co/u/BigFunger)
#### Post date: [April 5, 2016, 3:43pm UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/11 "2016-04-05T15:43:33Z")

</div>

@mrizwan were you able to get this to work? I have been away and apologize for my lapse in communication.

---

<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, 1:56pm UTC](https://discuss.elastic.co/t/i-am-un-able-to-get-any-result-by-using-divide-operator-in-kibana-4-3/43405/12 "2017-07-06T13:56:55Z")

</div>


