Things I have tried
Hi all,
I have enjoyed reading many threads (in full) on how you use dataview. Especially those by @arminta. I have also enjoyed this guide on dataview. This is a great community.
What I’m trying to do
I am trying to leverage the solution provided by @mnvwvnm to query my weekly habits.
It was easily to successfully replicate his code for my needs.
My Habit Template:
- AM:: Sleep | - | - | - | - | - | - | - | - |
- AM:: Journal | - | - | - | - | - | - | - |
- AM:: Lift | - | - | - | - | - | - | - |
- AM:: Bike | - | - | - | - | - | - | - |
My query
TABLE
map(AM, (z) => split(z, "\|")[0]) AS Habit,
map(AM, (z) => split(z, "\|")[1]) AS M,
map(AM, (z) => split(z, "\|")[2]) AS T,
map(AM, (z) => split(z, "\|")[3]) AS W,
map(AM, (z) => split(z, "\|")[4]) AS T,
map(AM, (z) => split(z, "\|")[5]) AS F,
map(AM, (z) => split(z, "\|")[6]) AS Sa,
map(AM, (z) => split(z, "\|")[7]) AS Su
FROM #habits
WHERE AM
SORT file.link ASC
This gives great group results for a week snapshot of my morning (AM) habits as a whole. But I have 10 other AM habits.
What I need help with
Now, I want to be able to query for individual habits - to better visualize individual trends over the year. What do I need to tweak in the query to be able to just search for my sleep data each week? Or is there a different way I should think about seeing the data for individual habits?
I suspect there is something relatively simple I can add to narrow down my results, but I am stuck, since I just started learning all things obsidian in the past month.