How to calculate values within a category for a period?

I received monthly work hours for all categories. It is necessary to display the operating hours for a specific month for a particular category. What’s the best way to do this?



Do you have a table with a unique list of these categories?

Hello, Robert_Petitto
thank you for your interest
yes, I attached a screenshot.

I think you can approach it like this.

  • In your Time Management table, create a math column with the formula:

YEAR(D)*10^2+MONTH(D) with D being D_Date.

I think this is much more reliable for all OS compared to what you seemingly do here (format date column I supposed).

  • Create a query column targetting the same table, filter by category ID is the same as this row > category ID and date value above equals to this row > date value.

  • Create a single value column targetting the query column above and return the first rowID that matches.

  • Create a rollup column targetting the query column above and return the sum of all hours.

  • Display a collection for the whole table, grouped by the month, filter by rowID equals the single value column, and the rollup for each item.

1 Like