Progress bar from tasks that include a specific date

Is there a way through dataview to show me only the tasks specified for a specific date and show them inside a progress bar?

example:

I want dataview to show me task 1 and task 2 from “Project A” and task 4 from “Project B”, becuase they have the same date, which is today and show them in a progress bar.

The example (image) doesn’t have part of the solution?

That progress bar I did it manual, I want it to be automatically from the tasks that include a specific date.

So. Let’s try this:

  1. In this example I use due:: instead of date:: (to avoid confusing with the function date().

  2. Example md files

# Project A

- [x] task 1 [due:: 2022-09-09]
- [ ] task 2 [due:: 2022-09-09]
- [ ] task 3 [due:: 2022-09-10]

---
---

# Project B

- [x] task 4 [due:: 2022-09-09]
- [ ] task 5 [due:: 2022-09-12]
- [ ] task 6 [due:: 2022-09-15]

  1. Daily note with the title in format YYYY-MM-DD (ex.: 2022-09-09):
# 2022-09-09

```dataviewjs
const myDate = dv.current().file.day.toFormat("yyyy-MM-dd")
const pages = dv.pages('"MyFolderPath"').file.tasks.where(t => t.due?.toFormat("yyyy-MM-dd") === myDate)
const total = pages.length
const done = pages.where(t => t.completed).length
const value = (done) / (total || 0) * 100

dv.paragraph("<progress value='" + value + "' max='100'></progress>" + "<br>" + value.toFixed(0) + "% completed")
```

```dataview
TASK
FROM "MyFolderPath"
WHERE due = this.file.day
```
  1. You need to change “MyFolderPath”: folder path, a tag or …
  2. Because I don’t know how to work properly with dates in JS I use the format conversion to facilitate the dates comparison.
  3. The result:
2 Likes

It’s worked, you saved my day. Thanks a lot.

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