# KPI with data from the last 30 days

**URL:** https://community.fibery.io/t/kpi-with-data-from-the-last-30-days/5368
**Category:** Get Help
**Created:** [November 2, 2023, 10:12pm UTC](https://community.fibery.io/t/kpi-with-data-from-the-last-30-days/5368 "2023-11-02T22:12:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![morganf](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@morganf](https://community.fibery.io/u/morganf)
#### Post date: [November 2, 2023, 10:12pm UTC](https://community.fibery.io/t/kpi-with-data-from-the-last-30-days/5368/1 "2023-11-02T22:12:35Z")

</div>

Hi there!

I am trying to calculate some numbers for KPIs in reports. I see how I can use SUM, SUMIF, etc to calculate them - I’m doing that, that’s perfect. But it’s doing it over the whole table. I want to create some KPIs that are things like, those numbers but “over the last 30 days” or “last month” or “this month”. Is there a way to do that?

Thank you!

---

<div class="post-metadata">

### Author: ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)
#### Post date: [November 2, 2023, 10:33pm UTC](https://community.fibery.io/t/kpi-with-data-from-the-last-30-days/5368/2 "2023-11-02T22:33:58Z")

</div>

When you say “over the last 30 days” what date are you referring to?  
(Creation Date, Modification Date, something else?)

Maybe some concrete examples of the data you’re working with would help us figure things out

---

<div class="post-metadata">

### Author: ![morganf](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@morganf](https://community.fibery.io/u/morganf)
#### Post date: [November 3, 2023, 1:55am UTC](https://community.fibery.io/t/kpi-with-data-from-the-last-30-days/5368/3 "2023-11-03T01:55:14Z")

</div>

Okay, good idea to be more specific, thank you.

This is for a non-profit. I have one database, “DonationPromises”, where I have people (related to a different database of people), and how much they have promised to donate to our non-profit.

I have a separate database, “Transactions”, where I note every time we receive a donation (as well as other financial transactions), including a field with a single select to note which transaction is a donation we receive. In this Transactions database, I also have a timestamp field (“DateOfActivity”) for the date we actually receive the donation (note that this isn’t the automatic timestamp within Fibery, but we manually add it).

I want KPIs that are along the lines of “$ value total of donations we’ve receive over the last 30 days”, “$ value total of donations we’ve received this month so far”, “$ value of donations we’ve received last month”, and “$ value total of donations we’ve receive year to date” etc.

Is this clearer?

Thank you for all your help!  
morgan

---

<div class="post-metadata">

### Author: ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)
#### Post date: [November 3, 2023, 9:32am UTC](https://community.fibery.io/t/kpi-with-data-from-the-last-30-days/5368/4 "2023-11-03T09:32:31Z")

</div>

This is a perfect use case for report view.  
As an example, I suggest creating a report based on your Transaction DB, with a single KPI, which is `SUM([Value])`  
(assuming that the ‘Value’ is the name of the field for the amount of the transaction).  
Then add a couple of filters, e.g. `Type is Donation` and `DateOfActivity is last 30 days` and see what you get.  
As you get better at reports, you can start building more and more sophisticated views, e.g. tables, charts etc.  
Check out the relevant section of the user guide here:  
[https://the.fibery.io/@public/User\_Guide/Guide/Reports-58](https://the.fibery.io/@public/User_Guide/Guide/Reports-58)
