# How to sum table values from last N days?

**URL:** <https://forum.obsidian.md/t/how-to-sum-table-values-from-last-n-days/95003>\
**Category:** Help\
**Tags:** dataview\
**Created:** [January 17, 2025, 11:49pm UTC](https://forum.obsidian.md/t/how-to-sum-table-values-from-last-n-days/95003 "2025-01-17T23:49:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![churnish](https://forum.obsidian.md/user_avatar/forum.obsidian.md/churnish/32/89588_2.png) [@churnish](https://forum.obsidian.md/u/churnish)\
**Post date:** [January 17, 2025, 11:49pm UTC](https://forum.obsidian.md/t/how-to-sum-table-values-from-last-n-days/95003/1 "2025-01-17T23:49:25Z")

</div>

### What I’m trying to do

I have a table tracking time spent on activities:

| Date | Minutes |
| --- | --- |
| 2025-01-18 | 30 |
| 2025-01-13 | 15 |
| 2025-01-10 | 8 |

I want to create a Dataview query that calculates the sum of Minutes, but only counting entries from the last 7 days. This would help me track my weekly limits. (Ideally, it would also show time remaining for a specified time limit e.g. for 90 mins/week.)

- The table is in my current note (not pulling data from other files).
- The table entries are not necessarily on consecutive days.
- I want to keep using this simple two-column table structure if possible, rather than switching to inline fields or YAML.

How can I correctly query this table format to show the rolling 7-day total?

_I’m also open to alternatives—maybe another plugin or an iOS app exists to fill this need?_

### Things I have tried

I’ve tried variations of the date filtering syntax but keep getting “No results” or errors about null values.

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [April 17, 2025, 11:50pm UTC](https://forum.obsidian.md/t/how-to-sum-table-values-from-last-n-days/95003/2 "2025-04-17T23:50:08Z")

</div>

Closed on April 17, 2025, 11:50pm UTC

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