# Table Chart showing incorrect doc "Count percentage"

**URL:** <https://discuss.elastic.co/t/table-chart-showing-incorrect-doc-count-percentage/298762>\
**Category:** Kibana\
**Created:** [March 3, 2022, 4:21pm UTC](https://discuss.elastic.co/t/table-chart-showing-incorrect-doc-count-percentage/298762 "2022-03-03T16:21:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Divyank\_Mahalle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divyank_mahalle/32/91240_2.png) [@Divyank\_Mahalle](https://discuss.elastic.co/u/Divyank_Mahalle)\
**Post date:** [March 3, 2022, 4:21pm UTC](https://discuss.elastic.co/t/table-chart-showing-incorrect-doc-count-percentage/298762/1 "2022-03-03T16:21:31Z")

</div>

Hi,

I created a table in kibana viz with elastic version 7.6.1.  
It's showing the incorrect "Count Percentage" tab in the table.  
I checked the config of Table viz,but still unable to solve this.

Snap-Incorrect percentage

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b4a0c1bafa552027ea44deb66171435686008aed.png)

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [March 10, 2022, 4:43pm UTC](https://discuss.elastic.co/t/table-chart-showing-incorrect-doc-count-percentage/298762/2 "2022-03-10T16:43:26Z")

</div>

Seems you are hitting this issue

> <https://github.com/elastic/kibana/issues/64939>
>
> \*\*Kibana version:\*\*
> master, 7.6.2
> \*\*Describe the bug:\*\*
> 
> There an issue with… Count percentage value rounding in Visualize Data Table. When using the default setting of \`format:percent:defaultPattern\`:
> 
> !\[Bildschirmfoto 2020-04-30 um 19 52 34\](https://user-images.githubusercontent.com/463851/80742818-4919e380-8b1c-11ea-9ff1-2f466d46da50.png)
> 
> The \*\*Count percentage\*\* of products priced \>= 0 ands \< 11 is displayed \*\*14.8%\*\*
> 
> !\[Bildschirmfoto 2020-04-30 um 19 59 16\](https://user-images.githubusercontent.com/463851/80743352-1ae8d380-8b1d-11ea-91b9-40382b84e780.png)
> 
> Setting it to \` 0,0.000%\`, it's displayed \*\*14.800%\*\* 
> 
> !\[Bildschirmfoto 2020-04-30 um 20 01 16\](https://user-images.githubusercontent.com/463851/80743513-613e3280-8b1d-11ea-9f1f-a58a1a574f0b.png)
> 
> Setting it to \` 0,0.\[00000\]%\`, it's displayed \*\*14.771%\*\* , that's what you'd expect when setting it to \` 0,0.000%\`
> 
> !\[Bildschirmfoto 2020-04-30 um 20 06 57\](https://user-images.githubusercontent.com/463851/80743941-2dafd800-8b1e-11ea-90ba-8c610dee8ad0.png)
> 
> This is due to internal rounding in UI in combination with the numeral formatter.
> 
> \* The number, calculated in the Data Table Vis, is \`0.0014771011575239054\`
> \* It's formatted with the numeral based percent formatter and becomes \`0.148%\`
> \* Then it's formatted again and becomes \`14.8%\`

The mentioned issue was solved in 7.8 upwards

> <https://github.com/elastic/kibana/pull/64948>
>
> \## Summary
> 
> Fixes #64939
> 
> Fixes https://github.com/elastic/kibana/issues/646…21
> 
> Fixes an issue with Count percentage value rounding in Visualize Data Table. When using the default setting of \`format:percent:defaultPattern\`:
> 
> !\[Bildschirmfoto 2020-04-30 um 19 52 34\](https://user-images.githubusercontent.com/463851/80742818-4919e380-8b1c-11ea-9ff1-2f466d46da50.png)
> 
> The \*\*Count percentage\*\* of products priced \>= 0 ands \< 11 in this example was displayed \*\*14.8%\*\* instead of \*\*14.771\*\*
> 
> !\[Bildschirmfoto 2020-04-30 um 19 59 16\](https://user-images.githubusercontent.com/463851/80743352-1ae8d380-8b1d-11ea-91b9-40382b84e780.png)
> The reason for this was that the number was formatted and rounded twice.
> 
> \### Checklist
> 
> Delete any items that are not applicable to this PR.
> 
> \- \[x\] \[Unit or functional tests\](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

---

<div class="post-metadata">

**Author:** ![Divyank\_Mahalle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divyank_mahalle/32/91240_2.png) [@Divyank\_Mahalle](https://discuss.elastic.co/u/Divyank_Mahalle)\
**Post date:** [March 10, 2022, 5:33pm UTC](https://discuss.elastic.co/t/table-chart-showing-incorrect-doc-count-percentage/298762/3 "2022-03-10T17:33:05Z")

</div>

HI @jsanz ,  
Thanks for the reply.

The below format works fine for table viz.

Percent format-

```auto
0.000%

```

Old format/Default Format-

```auto
0,0.[000]%

```

---

<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 7, 2022, 5:33pm UTC](https://discuss.elastic.co/t/table-chart-showing-incorrect-doc-count-percentage/298762/4 "2022-04-07T17:33:31Z")

</div>

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