# Timelion split and metric function together

**URL:** <https://discuss.elastic.co/t/timelion-split-and-metric-function-together/180028>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [May 7, 2019, 4:31pm UTC](https://discuss.elastic.co/t/timelion-split-and-metric-function-together/180028 "2019-05-07T16:31:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rocky\_RK](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@Rocky\_RK](https://discuss.elastic.co/u/Rocky_RK)\
**Post date:** [May 7, 2019, 4:31pm UTC](https://discuss.elastic.co/t/timelion-split-and-metric-function-together/180028/1 "2019-05-07T16:31:20Z")

</div>

Hello Kibana Experts,

I have below timelion function which works fine,

`es(index=pt-rmlog-2019*, split=Hostname.keyword:5)`

![image](https://us1.discourse-cdn.com/elastic/original/3X/7/7/77de4957b51969ad9d615ebd71a12d94ee060a9a.png)

However, when i tried to add a metric like below it doesn't show anything up even no error message. I'm trying to see the total count of the `User` on a particular Host.

`.es(index=pt-rmlog-2019*, split=Hostname.keyword:5, metric=sum:User)`

OR

`.es(index=pt-rmlog-2019*, split=Hostname.keyword:5, metric=sum:User.keyword)`

Below are my custom fields..

![image](https://us1.discourse-cdn.com/elastic/original/3X/0/a/0ac1fdb58408fa5a8d3d12f5d7cac2a3dbeefd99.png)

Would appreciate any help.

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [May 8, 2019, 1:49pm UTC](https://discuss.elastic.co/t/timelion-split-and-metric-function-together/180028/2 "2019-05-08T13:49:31Z")

</div>

@Rocky_RK

`User` seems to be a string-field, so you cannot do a sum on that. The sum-metric only works on numerical fields.

---

<div class="post-metadata">

**Author:** ![Rocky\_RK](https://avatars.discourse-cdn.com/v4/letter/r/ed655f/32.png) [@Rocky\_RK](https://discuss.elastic.co/u/Rocky_RK)\
**Post date:** [May 8, 2019, 3:25pm UTC](https://discuss.elastic.co/t/timelion-split-and-metric-function-together/180028/3 "2019-05-08T15:25:25Z")

</div>

Thanks a Mile @thomasneirynck for the revert, Is there another Way we can count for the `User`

---

<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:** [June 5, 2019, 3:25pm UTC](https://discuss.elastic.co/t/timelion-split-and-metric-function-together/180028/4 "2019-06-05T15:25:28Z")

</div>

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