Sum of field based on date in adjacent field

I have two tables:

Activities
Categories

Activities consists of:

  • Activity
  • Category (lookup)
  • Date Created
  • Time Spent

Categories consists of:

  • Category
  • Total Time ([Activities].lookup(Category,thisRow).[Time Spent].sum())

Currently, the Total Time field in the Categories table displays all time across all days for a given category. I would like to limit this to just the current day. How might I go about doing this?

Thanks,
Chris

Hi @Chris_Herrmann,
as usual, sharing your doc - or a working sample of it - would help to dig into the details of your implementation (and put directly hands on it).

However, the first question would be:

What does it imply?
Are you logging the latest changes in the Activity table?

In this case the formula could be:

[Activities].Filter(Category = thisRow && [*Latest Activity Date*] = Today()).[Time Spent].Sum()

Let me know if it helps.
Cheers.

Note: (for who doesn’t know yet),
Lookup() is an easy shortcut for Filter() formula and allows you to - well… - filter data with more complex conditions.