# Year over year, month over month, Year to date this year versus last

**URL:** <https://discuss.elastic.co/t/year-over-year-month-over-month-year-to-date-this-year-versus-last/24080>\
**Category:** Kibana\
**Created:** [June 22, 2015, 11:31am UTC](https://discuss.elastic.co/t/year-over-year-month-over-month-year-to-date-this-year-versus-last/24080 "2015-06-22T11:31:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [June 22, 2015, 6:37pm UTC](https://discuss.elastic.co/t/year-over-year-month-over-month-year-to-date-this-year-versus-last/24080/2 "2015-06-22T18:37:51Z")

</div>

The approach we plan to take for this use case is to provide [scripted fields](https://www.elastic.co/guide/en/kibana/current/managing-fields.html) that allow you to time-shift metrics you want to compare in the manner you described.

Unfortunately, Kibana scripted fields by default are based on [Lucene expressions](http://lucene.apache.org/core/4_9_0/expressions/index.html?org/apache/lucene/expressions/js/package-summary.html) that currently do not support date math -- we are working to enhance that in the future. If this is really important to you, you can also try using static Groovy scripts, which support date math, but much more cumbersome to set up in a secure manner and generally not recommended (more on that in [this thread](https://discuss.elastic.co/t/calling-groovy-script-from-kibana/2542/3)).

---

_[View the full topic](https://discuss.elastic.co/t/year-over-year-month-over-month-year-to-date-this-year-versus-last/24080)._
