cours/dataview tasks completed in current file.md
Oscar Plaisant 602a41e7f8 update
2024-12-25 22:30:24 +01:00

802 B

up::obsidian plugin dataview title::"cound tasks completed in a file" #s/obsidian


  • simple solution :
    • = length(filter(this.file.tasks.completed, (t) => t = true)) tasks completed
  • with html styling :
    • = "<button> tasks are " + round(length(filter(this.file.tasks.completed, (t) => t = true)) / length(this.file.tasks) * 100) + "% done </button>"
  • with minimal's <progress> tag :
    • = "<progress value='" + (length(filter(this.file.tasks.completed, (t) => t = true)) / length(this.file.tasks)) * 100 + "' max='100'></progress>" + "<br>" + round((length(filter(this.file.tasks.completed, (t) => t = true)) / length(this.file.tasks)) * 100) + "% completed"

Tasks

  • foo
  • bar
  • foobar
  • thing
  • those
  • then
  • therefore