Dataview filtering

Things I have tried

What I’m trying to do

I’m really new to dataview and certainly not a programmer - so apologize for the basic questions. I have viewed a number of videos and researched websites, and have tried a number of filters, but can’t get any to work properly.

What I am trying to do is to be able to filter on a day and then also filter out a blank (null) response for a list.

For example, I would like to get data in a list for an event that only happens on Sunday.

The date format that I use is: {{date:YYYY-MM-DD ddd}}
I have tried to do WHERE Sun (an many variations) but I can’t get it to filter properly.

Secondly, I would like to filter out where the response is null or blank. So if Exercise:: is blank (null) for Sun, then that date would be skipped in the list.

Is this possible? If so, how do I do it?

Before trying to answer for all the possible setups you might have, I figured I might as well just ask. Are the notes named with the date convention you mentioned? Or does the body of the note template just contain the date, for example, 2022-07-29 Fri somewhere within? Or does the note contain a date field that gets filled in, for example, like this: date:: 2022-07-29 Fri?

In the meantime, independent of the filtering for Sun dates, you can use something like the following in order to only list notes with the #Daily tag where an Exercise:: field exists and is not empty. Hope this helps some.

WHERE Exercise

I have a section listed as follows in the Daily Notes:

[[Daily Journal 2022]]: 2022-07-24 Sun

So what I am trying to do is filter on “Sun” so as to get just Sunday item listed.


Unfortunately, as far as I know Dataview cannot search for text within an entire file but rather within both explicit and implicit fields. I am trying to figure out a way to accomplish this with dataview while retaining your current setup. Unfortunately I haven’t reached a solution.

One workaround would be to use a native Obsidian query block like this, but unfortunately it does not check that Exercise is not blank. I’ll see if I can get this to check for it as well.

/#### \[\[Daily Journal 2022\]\].*Sun/

I’ll return if I can figure something out. Otherwise you may have to alter your template to utilize a field for the date. Then it would be much easier to create a working dataview query.

Good luck!

1 Like

Thanks for the effort. I thought with using the :: that whatever came after that would be able to be filtered on that line - I see I only have one : after the “Daily Journal” - perhaps adding :: would enable dataview to filter -


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