You could try something like the following:
- [project:: Something] (timespent:: 0.5h)
- kasdjadklajsd
- [project:: Different] (timespent:: 25 min)
- qweqweqweqwe
- [project:: Something] (timespent:: 1h 15min)
- iuozuioizouzio
## Queried version
```dataview
TABLE WITHOUT ID item.project as Project,
item.timespent.minutes as Timespent,
item.children.text as Comments
WHERE file = this.file
FLATTEN file.lists as item
WHERE !item.parent
```
Total workload: `= round(sum(filter(this.file.lists, (l) => l.timespent).timespent).hours, 2) `h
If this is kept in a note of its own it should display something like (with local names instead of Norwegian
):
Here I’ve done the total calculation outside of the table in a separate inline query focusing on the current file.
Similar queries can also be built over multiple files.
There are a few main points I would like to make though:
- To make dataview pick up the information as fields you need to use syntax like above with double colons
- Fields are connected either to the page, or to a list/task context. To be able to keep the
projectandtimespenttogether you need to have them in a list context. Otherwise they’re all collated into two (or more) separate lists of theprojectandtimespent(andcomment). - If you note the
timespentas duration, it’s a lot easier to sum them up later on, and you can usedurationformat()or similar measures to make it look pretty
This forum also holds various ways to do the summation of a column within the table (or as a postprocessing of the table).
