# Canvas table to have a count

**URL:** <https://discuss.elastic.co/t/canvas-table-to-have-a-count/353028>\
**Category:** Kibana\
**Created:** [February 11, 2024, 9:54pm UTC](https://discuss.elastic.co/t/canvas-table-to-have-a-count/353028 "2024-02-11T21:54:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![encathal](https://avatars.discourse-cdn.com/v4/letter/e/bc79bd/32.png) [@encathal](https://discuss.elastic.co/u/encathal)\
**Post date:** [February 11, 2024, 9:54pm UTC](https://discuss.elastic.co/t/canvas-table-to-have-a-count/353028/1 "2024-02-11T21:54:14Z")

</div>

Hi, I have a question how can I turn my fields.userinfo.Email.Keywords into a count column. I tried a few ways and I keep getting errors.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/8/98cdb7ed45048e2b93d757b9146ff1d5784d4063.png)

Thanks

---

<div class="post-metadata">

**Author:** ![encathal](https://avatars.discourse-cdn.com/v4/letter/e/bc79bd/32.png) [@encathal](https://discuss.elastic.co/u/encathal)\
**Post date:** [February 12, 2024, 3:18am UTC](https://discuss.elastic.co/t/canvas-table-to-have-a-count/353028/2 "2024-02-12T03:18:29Z")

</div>

I figure it out.

SELECT TOP 10 fields.UserInfo.RetailerLocationStoreNumber as "Store Number", fields.UserInfo.RetailerLocationCity as "City",

COUNT(fields.UserInfo.RetailerLocationCity) as Activity

FROM "beauty-fluent-\*"

Where NOT fields.UserInfo.RetailerLocationStoreNumber ='0' and fields.UserInfo.RetailerLocationStoreNumber IS NOT NULL

Group By fields.UserInfo.RetailerLocationStoreNumber, fields.UserInfo.RetailerLocationCity

Order by Activity DESC,fields.UserInfo.RetailerLocationStoreNumber, fields.UserInfo.RetailerLocationCity

I guess I just needed to step away to think it out.

---

<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:** [March 11, 2024, 3:19am UTC](https://discuss.elastic.co/t/canvas-table-to-have-a-count/353028/3 "2024-03-11T03:19:23Z")

</div>

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