Data view query regarding tasks

Things I have tried

What I’m trying to do

Here’s a fun one … :slight_smile:

I want to create a data view query for my daily notethat shows me:

Tasks WITHOUT a due date
Tasks due today
Tasks due this week.

If it’s three different queries, I have no problem with that.

Thanks!!

1 Like

In a simple answer:

tasks without due date

TASK
WHERE !due

tasks due today

TASK
WHERE due = date(today)

tasks due this week

TASK
WHERE due.week = date(today).week

But there are some issues:

  • if only not completed tasks, you need to add WHERE !completed
  • “week” is a number (for example, date(today).week = 3) and repeats all months - so, you need to use WHERE due.week = date(today).week AND due.month = date(today).month to restrict results to “this week”.
1 Like

Fantastic - thank you so much!

In the “WHERE” section, can I specify a tag that I DON’T want it to pull data from?

Not in “WHERE” (conditions) but in “FROM” (sources).
To exclude pages with tag #mytag you can write:
FROM -#mytag

(in this case “-” means NOT)

https://blacksmithgu.github.io/obsidian-dataview/query/queries/#from

You’re wonderful, thank you.

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