# How to split lines based on a term in Timelion using split() or other?

**URL:** <https://discuss.elastic.co/t/how-to-split-lines-based-on-a-term-in-timelion-using-split-or-other/85851>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [May 16, 2017, 4:42am UTC](https://discuss.elastic.co/t/how-to-split-lines-based-on-a-term-in-timelion-using-split-or-other/85851 "2017-05-16T04:42:12Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)\
**Post date:** [May 17, 2017, 4:49am UTC](https://discuss.elastic.co/t/how-to-split-lines-based-on-a-term-in-timelion-using-split-or-other/85851/3 "2017-05-17T04:49:32Z")

</div>

Hi @Stacey_Gammon ,

Thanks for your reply. Could you tell me where should i place it in my code? I tried;

```
.es(index=mylogs-*, q='response:error',metric=count,split=username:10).divide(.es(index=mylogs-*, q='response:success',metric=count).if("eq", 0, .es(index=mylogs-*, q='response:error',metric=count).multiply(-1))).label("Ratio").lines(show=true,width=2).points(show=true,radius=4,fill=9,weight=0)

```

Is this correct? I have another doubt, I want to display username as labels here. Currently, what I can see is 10 lines and all lines have label `Ratio`. I want to display username there. How can I do this?

---

_[View the full topic](https://discuss.elastic.co/t/how-to-split-lines-based-on-a-term-in-timelion-using-split-or-other/85851)._
