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

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?