# Canvas - percentage of docs having specific value in a field (row by row)

**URL:** <https://discuss.elastic.co/t/canvas-percentage-of-docs-having-specific-value-in-a-field-row-by-row/205559>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [October 28, 2019, 10:36pm UTC](https://discuss.elastic.co/t/canvas-percentage-of-docs-having-specific-value-in-a-field-row-by-row/205559 "2019-10-28T22:36:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tims](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tims/32/46750_2.png) [@tims](https://discuss.elastic.co/u/tims)\
**Post date:** [November 18, 2019, 3:31pm UTC](https://discuss.elastic.co/t/canvas-percentage-of-docs-having-specific-value-in-a-field-row-by-row/205559/2 "2019-11-18T15:31:36Z")

</div>

Hey @Jim_Boutcher,

Here's an example of calculating percentages in Canvas, let me know if this helps.

> [@Kibana Canvas , Calculate percentage using to aggregations](https://discuss.elastic.co/t/kibana-canvas-calculate-percentage-using-to-aggregations/190702/4):
>
> This is a little complex, but I believe what you want is possible in Canvas. Essentially you need to query your index twice in the same expression to get the two different counts, and it also utilizes filter groups which was introduced in Kibana 7.2.0. I assume you wanted both counts to be filtered by the same time filter to filter your date field. Here's the example using the ecommerce sample data set: [Jul-18-2019%2015-16-52] Time filter on order\_date: timefilterControl compact=true column…

---

_[View the full topic](https://discuss.elastic.co/t/canvas-percentage-of-docs-having-specific-value-in-a-field-row-by-row/205559)._
