# Sum with unique object

**URL:** https://discuss.elastic.co/t/sum-with-unique-object/225425
**Category:** Logstash
**Created:** [March 27, 2020, 2:46pm UTC](https://discuss.elastic.co/t/sum-with-unique-object/225425 "2020-03-27T14:46:56Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![Emna1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emna1/32/64354_2.png) [@Emna1](https://discuss.elastic.co/u/Emna1)
#### Post date: [April 4, 2020, 9:54am UTC](https://discuss.elastic.co/t/sum-with-unique-object/225425/14 "2020-04-04T09:54:56Z")

</div>

Hi @Badger , i see this topic [Extract Month and Year from date field](https://discuss.elastic.co/t/extract-month-and-year-from-date-field/209090/4)  
So, I have the same trouble and i want a new field contain for example 2020-02  
i try this code  
grok { match =\> { "Date\_of\_entry" =\> "^%{YEAR:year}-%{MONTHNUM}" } }  
but he extract just the month so what shoud i add to this code to get result like this 2020-02?  
can you answer me please?

---

_[View the full topic](https://discuss.elastic.co/t/sum-with-unique-object/225425)._
