Find rows with date field matching date of daily note where the query is made

This formatting is challenging for dataview because it is hard for it to figure out how the items within the two fields relate to eachother.
For the dataviewjs from the CSV, I’d start out by seeing what happens if you just make a dataviewjs codeblock with something simple like:

const myData = await dv.io.csv("myCSVFileName.csv");
dv.table(["eventDate", "event"], myData);

The first line here loads the information from the CSV file into a variable which I have un-creatively called “myData”. The second line tells dataview to make a table with the given column headings and “myData” as the contents.

For the daily note query, the general structure would be to replace the very end of the second line above that just says myData with something like myData.where((event) => event.column1 === dv.current().file.day). The formatting is a little different for this where than the one in Dataview, but hopefully you can see the similarities as well. dv.current() is the dataviewjs equivalent for this in dataview.

Good luck, let me know if I can explain anything further!

2 Likes