# Retrieve value based on a single field using metric - Timelion

**URL:** <https://discuss.elastic.co/t/retrieve-value-based-on-a-single-field-using-metric-timelion/81054>\
**Category:** Kibana\
**Created:** [April 3, 2017, 9:54pm UTC](https://discuss.elastic.co/t/retrieve-value-based-on-a-single-field-using-metric-timelion/81054 "2017-04-03T21:54:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavithrakc](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@pavithrakc](https://discuss.elastic.co/u/pavithrakc)\
**Post date:** [April 3, 2017, 9:54pm UTC](https://discuss.elastic.co/t/retrieve-value-based-on-a-single-field-using-metric-timelion/81054/1 "2017-04-03T21:54:21Z")

</div>

Hello All,

I have been trying to understand and utilize Time series in my project. I actually want to fetch data of a particular index based on a metric "sum" of field LastQty\_Tag\_32 and split them based on another field to know about the progress of it.

.es(timefield="Time\_Tag",index="outbound", metric="sum:LastQty")

I am able to acheive till metric based evaluation and I am not sure how to do the split of based on particular field  
called "Symbol\_Tag" here.

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [April 4, 2017, 8:12pm UTC](https://discuss.elastic.co/t/retrieve-value-based-on-a-single-field-using-metric-timelion/81054/2 "2017-04-04T20:12:51Z")

</div>

If I'm understanding correctly, you should be able to append split=field:number\_of\_terms to your query.  
e.g `.es(timefield="Time_Tag",index="outbound", metric="sum:LastQty", split=Symbol_Tag:10)`  
`

---

<div class="post-metadata">

**Author:** ![pavithrakc](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@pavithrakc](https://discuss.elastic.co/u/pavithrakc)\
**Post date:** [April 5, 2017, 3:21pm UTC](https://discuss.elastic.co/t/retrieve-value-based-on-a-single-field-using-metric-timelion/81054/3 "2017-04-05T15:21:43Z")

</div>

it worked. Thank you.

---

<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:** [May 3, 2017, 3:21pm UTC](https://discuss.elastic.co/t/retrieve-value-based-on-a-single-field-using-metric-timelion/81054/4 "2017-05-03T15:21:51Z")

</div>

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