Dataview query - Using a list of topics to create a weekly schedule with inline metadata fields

Hi there, been banging my head all day going trough dataview docs and videos but unfortunately couldn’t get a solution.

I have a page with a number of topics/strings containing inline metadata:

1.[week::1] [name::[[1.Circle of 5ths]]] [day_of_the_week::monday]
2. [week::1] [name::[[2.Minor Scales, Intervals]] ] [day_of_the_week:: monday]
3. [week:1] [name::[[3.Intervals - Consonance vs Dissonance]] ] [day_of_the_week::tuesday]

In order to create a weekly table schedule, I would like to query these on separate tables so that for table 1=week 2, table 2=week 2 so on so forth.

This is what I have so far:

TABLE WITHOUT ID week, name AS topics, day_of_the_week 
FROM "04-Resources/Music Practice/Theory/00.Music Theory Dr. B Index" 
WHERE contains(day_of_the_week, "monday")

From the script I get all days of the week, not just monday

If I get rid of WHERE line, I get all the strings which contain inline metadata. Clearly the issue is with the WHERE line.

Things I tried:

WHERE contains(day_of_the_week, = “monday”) and other variations to no avail.

Can anyone help?

The following is untested, but it seems like you want to filter on specific list items, and to do that you need to flatten the file.lists into items, so try the following:

```dataview
TABLE WITHOUT ID item.week as Week, item.name AS topics, item.day_of_the_week  as Day
FROM "04-Resources/Music Practice/Theory/00.Music Theory Dr. B Index" 
FLATTEN file.lists as item
WHERE item.day_of_the_week = "monday"
```
Bonus tip: How to present code properly in a forum post

If you want to showcase either markdown, or code blocks, or dataview queries properly in a forum post, be sure to add one line before and one life after what you want to present with four backticks, ````. This will ensure that any other backticks (like in code blocks or queries) is properly shown.

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