# Year to Date Calculation: Calculate a sum

**URL:** https://community.fibery.io/t/year-to-date-calculation-calculate-a-sum/738
**Category:** Get Help
**Created:** [June 3, 2020, 7:28pm UTC](https://community.fibery.io/t/year-to-date-calculation-calculate-a-sum/738 "2020-06-03T19:28:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![helloitse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/helloitse/32/498_2.png) [@helloitse](https://community.fibery.io/u/helloitse)
#### Post date: [June 3, 2020, 7:28pm UTC](https://community.fibery.io/t/year-to-date-calculation-calculate-a-sum/738/1 "2020-06-03T19:28:40Z")

</div>

I’m hoping to add up the total sum of [Payment].Amount to [Invoices]  
However, I want to filter by the date of the payment, so i am only calculating payments for this calendar year.

I think this might be possible already. But I can’t crack it.

```auto
    Invoices.Sum(
     Payments.Filter([Payment Date] > 2020-01-01).Sum(Amount)
    )

```

Any ideas of how I can filter the Payments buy days after January 1st?

---

<div class="post-metadata">

### Author: ![Polina\_Zenevich](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/polina_zenevich/32/480_2.png) [@Polina\_Zenevich](https://community.fibery.io/u/Polina_Zenevich)
#### Post date: [June 4, 2020, 9:33am UTC](https://community.fibery.io/t/year-to-date-calculation-calculate-a-sum/738/2 "2020-06-04T09:33:52Z")

</div>

Hi, Enoma! 🤗

The problem is that for now you can only compare fields of the Type, but can’t add your own specific date, like in your case😥  
Your request looks good and reasonable, so we’ve added it to our backlog and I will text you back, once it will be possible.

Thank you ❤

---

<div class="post-metadata">

### Author: ![helloitse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/helloitse/32/498_2.png) [@helloitse](https://community.fibery.io/u/helloitse)
#### Post date: [June 4, 2020, 7:23pm UTC](https://community.fibery.io/t/year-to-date-calculation-calculate-a-sum/738/3 "2020-06-04T19:23:50Z")

</div>

Sounds good!  
I came up with a temporary workaround until then:  
create a date field where & manually input the first day of the calendar year for the payment (this can be a formula later when the functionality exists).  
When configuring this field, “Start of Year” set the default value to the start of the year.  
so then the formula will read [Payment Date] \> [Start of Year]

---

<div class="post-metadata">

### Author: ![mdubakov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/mdubakov/32/10_2.png) [@mdubakov](https://community.fibery.io/u/mdubakov)
#### Post date: [June 8, 2020, 9:55am UTC](https://community.fibery.io/t/year-to-date-calculation-calculate-a-sum/738/4 "2020-06-08T09:55:37Z")

</div>

@helloitse  
We’ve added Date function in the latest release

Date(2020, 1, 29)

---

<div class="post-metadata">

### Author: ![helloitse](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/helloitse/32/498_2.png) [@helloitse](https://community.fibery.io/u/helloitse)
#### Post date: [June 8, 2020, 3:14pm UTC](https://community.fibery.io/t/year-to-date-calculation-calculate-a-sum/738/5 "2020-06-08T15:14:39Z")

</div>

🎉 this is fantastic!
