Sort Tasks in Data View Table by completion status

What I’m trying to do

  • I have a Data View Table for all my created tasks (I want to have an overview, since the tasks are scattered among various files)
    Now I want to sort the tasks by their completion status to see what is still open

Things I have tried

  • I have tried to apply the SORT function for my Status column
  • I have recoded the completion status to 1 and 0 (I thought maybe it cannot order strings; but I almost completely new to DataView and Queries overall so please be patient if I missed a simple solution)

This is my current Query (got it from the forum too):

TABLE without ID regexreplace(Tasks.text,"\[.*$", "") AS Task, choice(Tasks.completed, 1, 0) AS "Status", file.link AS "File"
WHERE file.tasks
FLATTEN file.tasks AS Tasks 
SORT Status ASC

Thanks for helping :smile:

1 Like

+1 I have the same issue too

If you dont mind using a one stop solution for Task Management System instead of viewing them in Markdown files you can consider trying out CardBoard Plugin, to see all your tasks in Kanban View.

A more powerful plugin is under process of getting released to the Obsidian Plugin Marketplace called Task Board. This will give you much more features to manage your tasks efficiently and sorting tasks based on the date of completion, etc.

You can go through this topic, to see how using a single Board for Task Management can be a better GTD methodology : Task Board : Another GTD methodology | Similar to GitHub Projects Planning