# Split value

**URL:** <https://discuss.elastic.co/t/split-value/157519>\
**Category:** Kibana\
**Created:** [November 20, 2018, 10:51am UTC](https://discuss.elastic.co/t/split-value/157519 "2018-11-20T10:51:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aya-kh](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Aya-kh](https://discuss.elastic.co/u/Aya-kh)\
**Post date:** [November 20, 2018, 10:51am UTC](https://discuss.elastic.co/t/split-value/157519/1 "2018-11-20T10:51:24Z")

</div>

hello everyone,

how could i split the value of the metric, which has number + unit (ex: 4 years)  
i want to split the numerical value to convert it from years to days  
but the problem in bar stays the 'year ' with the converted value like:  
 ![split](https://us1.discourse-cdn.com/elastic/original/3X/4/d/4d72cccc7d0987d47308d2c9798c6968ccc84c8c.png)

 ![days](https://us1.discourse-cdn.com/elastic/original/3X/b/1/b18c26ba2c218529e181d75b21e0953ed71dc112.png)

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [November 21, 2018, 2:19am UTC](https://discuss.elastic.co/t/split-value/157519/2 "2018-11-21T02:19:49Z")

</div>

You should make sure and index the value in a format that elasticsearch understands. A string can't be used effectively as a time unit, but if you stored the value in elasticsearch as a `days_since_modified: x` instead you would have a much better visualization.

---

<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:** [December 19, 2018, 2:20am UTC](https://discuss.elastic.co/t/split-value/157519/3 "2018-12-19T02:20:00Z")

</div>

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