# Canvas query: COUNT of field

**URL:** <https://discuss.elastic.co/t/canvas-query-count-of-field/237854>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [June 19, 2020, 7:32pm UTC](https://discuss.elastic.co/t/canvas-query-count-of-field/237854 "2020-06-19T19:32:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luopipi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luopipi/32/79231_2.png) [@luopipi](https://discuss.elastic.co/u/luopipi)\
**Post date:** [June 19, 2020, 7:32pm UTC](https://discuss.elastic.co/t/canvas-query-count-of-field/237854/1 "2020-06-19T19:32:33Z")

</div>

in canvas, I am using query as:

SELECT COUNT("My Field Name") FROM "index\*"

It shows error when there is space in "My Field Name".  
Any idea how the space should be handled?

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [June 19, 2020, 8:00pm UTC](https://discuss.elastic.co/t/canvas-query-count-of-field/237854/2 "2020-06-19T20:00:36Z")

</div>

I thought wrapping it in single or double quotes is how. Are you putting the double quotes up there to point attention to the field name or you actually using them in the query?

---

<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:** [July 17, 2020, 8:07pm UTC](https://discuss.elastic.co/t/canvas-query-count-of-field/237854/3 "2020-07-17T20:07:20Z")

</div>

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