# Field Data Format not working when using bucket in Visualize

**URL:** https://discuss.elastic.co/t/field-data-format-not-working-when-using-bucket-in-visualize/98526
**Category:** Kibana
**Created:** [August 28, 2017, 9:28am UTC](https://discuss.elastic.co/t/field-data-format-not-working-when-using-bucket-in-visualize/98526 "2017-08-28T09:28:31Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![byakuinss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/byakuinss/32/23954_2.png) [@byakuinss](https://discuss.elastic.co/u/byakuinss)
#### Post date: [August 28, 2017, 9:28am UTC](https://discuss.elastic.co/t/field-data-format-not-working-when-using-bucket-in-visualize/98526/1 "2017-08-28T09:28:31Z")

</div>

The field is using Btyes format, it works fine in Discovery and Average aggregation in Visualize.

Indices Pattern Page:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/1/310859da887d0531c8511c766bd9d87beb5ef44d.png)  
Average Aggregation:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/0/1069f378a2763444bbd1aef3754f9f992d236c79.png)

But when I changed to average aggregation by Max bucket, it turns to number format. Is this normal? Or What can I do to let it display in Bytes format again?  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/a/4a20559654d431f67ea1c4f48c2aa5395f60390c.png)

---

<div class="post-metadata">

### Author: ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)
#### Post date: [August 30, 2017, 9:57am UTC](https://discuss.elastic.co/t/field-data-format-not-working-when-using-bucket-in-visualize/98526/2 "2017-08-30T09:57:43Z")

</div>

HI @byakuinss,

I was able to reproduce the issue, thanks for binging this to our attention. We would appreciate it if you filed a [new issue on GitHub](https://github.com/elastic/kibana/issues/new) describing the problem as you did here.

In the meantime as a workaround I would suggest using the "Visual Builder" visualization type to create a "Metric" visualization:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/7/d7fc4317b533f141396161a978ce14aa878b090c.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/5/d5c83b00ab56ce53ed2b14403bb4433f064b61b6.png)

---

<div class="post-metadata">

### Author: ![byakuinss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/byakuinss/32/23954_2.png) [@byakuinss](https://discuss.elastic.co/u/byakuinss)
#### Post date: [August 31, 2017, 3:23am UTC](https://discuss.elastic.co/t/field-data-format-not-working-when-using-bucket-in-visualize/98526/3 "2017-08-31T03:23:53Z")

</div>

Hi @weltenwort

Thanks for your kindly suggestion. I will create an issue on Github of this problem.  
I also tried to use the "Visual Builder" to create the Metric visualization, but I got the same issue while using both Average Aggregation and Overall Max Bucket. By the way, my elasticsearch and kibana versions are 5.4.1.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/4/54e8869954417a100d710037b2634a714ad5d104.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/e/2e38a4ffe89f0024c395a02c0eb7d80a413e2b4d.png)

---

<div class="post-metadata">

### Author: ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)
#### Post date: [August 31, 2017, 8:40am UTC](https://discuss.elastic.co/t/field-data-format-not-working-when-using-bucket-in-visualize/98526/4 "2017-08-31T08:40:38Z")

</div>

Did you select "Bytes" as the "Data Formatter" in the metric options? Unfortunately the Visual Builder does not honor the field formatters configured in the index patterns automatically.

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/5/d5c83b00ab56ce53ed2b14403bb4433f064b61b6.png)

---

<div class="post-metadata">

### Author: ![byakuinss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/byakuinss/32/23954_2.png) [@byakuinss](https://discuss.elastic.co/u/byakuinss)
#### Post date: [August 31, 2017, 9:22am UTC](https://discuss.elastic.co/t/field-data-format-not-working-when-using-bucket-in-visualize/98526/5 "2017-08-31T09:22:16Z")

</div>

Oh, I see! Sorry, I didn't notice the settings on options page.  
I tried it again and it works fine. I will use Visual Builder to create Metric visualization from now on.  
Very grateful for your help!

---

<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: [September 28, 2017, 9:22am UTC](https://discuss.elastic.co/t/field-data-format-not-working-when-using-bucket-in-visualize/98526/6 "2017-09-28T09:22:36Z")

</div>

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