Why does the SORT tag statement not work? I would expect task 3 to be 2nd on the list and task 5 to be higher up on the list as well. (Note - each of these tasks could be in different daily notes)
I did try the asc/desc option previously and still nothing is sorted.
I also tried your option with multiple sorts and it still is not sorting the list.
TASK FROM ""
WHERE (contains(tags, "Y2023")
AND contains(tags, "SP")
AND contains(tags, "/P"))
and !completed
SORT contains(file.tags, "Y2023") asc
SORT contains(file.tags, "/Q") asc
SORT contains(file.tags, "SP") asc
SORT contains(file.tags, "/P") asc
The following seems to do the trick. Just need to modify it slightly to support all tags but the sorting does work. I just wish it worked with plan dataview query.
Here you’re sorting on whether the entire list of Tags contains various bits and parts. An alternate approach would be to filter out just the one you want to use for sorting.
Yet another approach would possibly be to filter out the one tag you want, and split it into its subtags which would possibly ease the where and sort clauses.
I’m on mobile now, so can’t write you the examples, just give you some hints.