# Formatting output in a metric visualization

**URL:** <https://discuss.elastic.co/t/formatting-output-in-a-metric-visualization/103193>\
**Category:** Kibana\
**Created:** [October 9, 2017, 8:48am UTC](https://discuss.elastic.co/t/formatting-output-in-a-metric-visualization/103193 "2017-10-09T08:48:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![eebee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eebee/32/26799_2.png) [@eebee](https://discuss.elastic.co/u/eebee)\
**Post date:** [October 9, 2017, 8:48am UTC](https://discuss.elastic.co/t/formatting-output-in-a-metric-visualization/103193/1 "2017-10-09T08:48:25Z")

</div>

I'm having a couple of metric outputs to show average processing times, but I get alot of decimals in my answers.

[Visualization edit view](http://apendofiles.governor.rocks/kibana3.png)

I've tried to set the number formatting for the field I'm calculating the average from, but still there is alot of decimals.

[Number formatting.](http://apendofiles.governor.rocks/kibana4.png)

Any ideas?

---

<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:** [October 11, 2017, 10:36am UTC](https://discuss.elastic.co/t/formatting-output-in-a-metric-visualization/103193/2 "2017-10-11T10:36:50Z")

</div>

Hello,

That doesn't look like the the same field is being used in your metric visualization. You have `Task time` as the field used in the first screenshot and another one in the second screenshot. Are you using that second field in something like a scripted field?

---

<div class="post-metadata">

**Author:** ![eebee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eebee/32/26799_2.png) [@eebee](https://discuss.elastic.co/u/eebee)\
**Post date:** [October 11, 2017, 11:34am UTC](https://discuss.elastic.co/t/formatting-output-in-a-metric-visualization/103193/3 "2017-10-11T11:34:31Z")

</div>

Hi!

TaskTime is used in both places, and both TaskTime and kpiData.Execution Time (Clock).long are formatted with only one decimal.

---

<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:** [October 11, 2017, 2:29pm UTC](https://discuss.elastic.co/t/formatting-output-in-a-metric-visualization/103193/4 "2017-10-11T14:29:35Z")

</div>

Ok, trying to track down the issue. Are you using 5.6.0 or a newer version of Kibana? If not, you might be encountering the problem that has been fixed in this PR: [https://github.com/elastic/kibana/pull/12913](https://github.com/elastic/kibana/pull/12913)

---

<div class="post-metadata">

**Author:** ![eebee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eebee/32/26799_2.png) [@eebee](https://discuss.elastic.co/u/eebee)\
**Post date:** [October 12, 2017, 6:02am UTC](https://discuss.elastic.co/t/formatting-output-in-a-metric-visualization/103193/5 "2017-10-12T06:02:02Z")

</div>

I'm using 5.6.1. Should I upgrade the files as in this instruction?

[https://github.com/Dreadnoth/kibana/commit/fea4ee1ae076ae159427f999010ceab60f3d5114](https://github.com/Dreadnoth/kibana/commit/fea4ee1ae076ae159427f999010ceab60f3d5114)

---

<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:** [October 12, 2017, 2:33pm UTC](https://discuss.elastic.co/t/formatting-output-in-a-metric-visualization/103193/6 "2017-10-12T14:33:27Z")

</div>

I just checked this locally and it looks like it's a regression. It seems that the average metric doesn't take in account the formatting for the field if you do a Split by field, like you're doing there.  
I've opened a new bug on this here: [https://github.com/elastic/kibana/issues/14445](https://github.com/elastic/kibana/issues/14445)

---

<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:** [November 9, 2017, 2:33pm UTC](https://discuss.elastic.co/t/formatting-output-in-a-metric-visualization/103193/7 "2017-11-09T14:33:51Z")

</div>

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