# Kibana change of decimal values in colour

**URL:** <https://discuss.elastic.co/t/kibana-change-of-decimal-values-in-colour/266327>\
**Category:** Kibana\
**Created:** [March 5, 2021, 7:38am UTC](https://discuss.elastic.co/t/kibana-change-of-decimal-values-in-colour/266327 "2021-03-05T07:38:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [March 5, 2021, 7:38am UTC](https://discuss.elastic.co/t/kibana-change-of-decimal-values-in-colour/266327/1 "2021-03-05T07:38:39Z")

</div>

Hi all,

I'm a float numeric field which i have values like 21.283774493.  
I have managed to limit to 2 digits like 21.28.

Now the problem is when i use conditional colour for my number in edit field option, format goes off and again i see values like 21.283774493 highlighted in colour

Any turnaround for this

---

<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 5, 2021, 1:00pm UTC](https://discuss.elastic.co/t/kibana-change-of-decimal-values-in-colour/266327/2 "2021-03-05T13:00:35Z")

</div>

You can only have 1 field formatter at a time so you have to choose. I'd recommend using the digit formatte, because if you use that field in a metric visualization there are more options there to customize text color and background color.

---

<div class="post-metadata">

**Author:** ![marcosvrrs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcosvrrs/32/77073_2.png) [@marcosvrrs](https://discuss.elastic.co/u/marcosvrrs)\
**Post date:** [March 11, 2021, 2:38pm UTC](https://discuss.elastic.co/t/kibana-change-of-decimal-values-in-colour/266327/3 "2021-03-11T14:38:02Z")

</div>

@Marius_Dragomir I just had the same problem. I have some documents that need to be displayed their last value. I managed to display in a data table reading an answer that you gave few years ago ( [Display latest value in a „Metric“](https://discuss.elastic.co/t/display-latest-value-in-a-metric/114930) )

But there is no turnaround for this when we try to conditional color a field in a data table. Tried the same in TSVB and it's not possible to use the "Aggregate with concatenate".  
Would love some help solving this.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [March 31, 2021, 3:12pm UTC](https://discuss.elastic.co/t/kibana-change-of-decimal-values-in-colour/266327/5 "2021-03-31T15:12:08Z")

</div>

@Marius_Dragomir @marcosvrrs  
I got a turnaround for this.

**Basically, i entered the below json input in advanced field of kibana visualization. I was able to control the number of decimal places showing.**  
However I used nearest roundoff value as i was calculating for an amount value.

```auto
{
  "script": {
"inline":"Math.round(doc['Init_amount'].value * 100.0)/100.0",
    "lang": "painless"
  }
}

```

I was able to roundoff to 2 decimal places.  
Also if we change from 100 to 1000, we can roundoff to 3 decimal places.

---

<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 28, 2021, 3:12pm UTC](https://discuss.elastic.co/t/kibana-change-of-decimal-values-in-colour/266327/6 "2021-04-28T15:12:18Z")

</div>

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