Things I have tried

Searched help files and this forum, no exact use case. I use Dataview and Tasks extensively, but I am not IT savvy. I found how to derive # of active tasks on a given page, but since my project pages have queries rather than actual tasks, it doesn’t help.

What I’m trying to do

How can I derive a count of active (=not completed) tasks with a certain tag?

I tag my tasks with a project name. It’s more convenient for me vs a project-dedicated page, as I tend to take notes in a scattered way, eg. I can add a task to a literature note, or to daily notes, or to a quick one-liner note.

When Tasks lists my tasks (not completed and description includes #tag-of-interest), it gives the number I need after the list, but how to get this number as a separate value?

I’m trying to build a dashboard where I could have a project and # of open tasks per project. Can’t figure out how to get to this count.

A few tricks you can apply:

Result:

image

Code

`= "<progress value='" + (length(filter(this.file.tasks.completed, (t) => t = true)) / 150) * 100 + "' max='100'></progress>" + "<br>" + round((length(filter(this.file.tasks.completed, (t) => t = true)) / 150) * 100) + "% total completion"`

`= "<progress value='" + ((length(this.file.tasks)) / 150) * 100 + "' max='100'></progress>" + "<br>" + round((length(this.file.tasks) / 150) * 100) + "% traits added"`

Current total:  **`=(length(this.file.tasks))`**
Done total:  **`=(length(filter(this.file.tasks.completed, (t) => t = true)))`**

I forgot, but if I’m not mistaken this is by using the Dataview plugin with these settings on:

Hi.
To better understand your goal and the way to achieve it, please add more information:

  • tasks examples (if #tag in the task text or in a specific inline field key in the task);
  • your desired output (a table mockup);
  • your tasks query.