Greetings All,
I have started using Dataview over the last week or so am seem to have reached a bit of a hurdle. I should note here I have some coding experience but not specifically with JS so i’ve been sticking to the DQL for now.
I am presently looking to create a daily note, in a sense a journal (though this isn’t relevant to the technical side the context may help), which I will complete each day.
Each of the notes presently are tagged with #journal
Presently I have an Inline Field called thoughts::
to which I am adding emojis as responses such as or
(however if needed these could be swapped out for words such as ‘office’ or ‘baby’)
An example line would be thoughts:: 🏢🍼
What I’m trying to do
I am looking to create a table which counts the instances of each of the emojis across the notes tagged "#journal’ so that is would look something like this;
Emoji | Count
| 3
| 2
The problem comes when there is more than one Emoji used in Inline Field, as such I have detailed the below to hopefully explained further;
- When only ONE emoji is in the Inline Field, the table shows the count;
thoughts:: 🏢
Emoji | Count
| 1
- When TWO OR MORE emojis are in the Inline Field, the table shows nothing;
Emojis | Count
Things I have tried
I have used a combination of different TABLE attempts, some of which I don’t have to hand now but the latest I have is the following;
TABLE
length(rows) as Count
WHERE type = "journal"
WHERE thoughts = "🏢" or thoughts = "🍼" or thoughts = "♻" or thoughts = "🩺" or thoughts = "📺" or thoughts = "💔" or thoughts = "💝"
GROUP BY thoughts
I have also tried to add the thoughts::
section into the YAML Frontmatter in case that worked but that didn’t seem to be picked up by the table either.
I have routed around the forums (both here and reddit) and also the Dataview docs, I think this might be me incorrectly using Inline Fields, but this could just be me being a melon.
Thanks in advance peeps