Trying to set up a progress bar above a long task list

Hey all!

I’m quite new to Obsidian. At the moment I am trying to set up a progress bar above a long list of topics I would like to cover within Medicine. I believe there is a way of doing this through the plugin Dataview. I have found a js that seemingly would do it but I can’t get it working

Things I have tried

Inserting the below at the top of the note containing all checkboxes

= "<progress value='" + (length(filter(this.file.tasks.completed, (t) => t = true)) / length(this.file.tasks.text)) * 100 + "' max='100'></progress>" + " " + (length(filter(this.file.tasks.completed, (t) => t = true)) / length(this.file.tasks.text)) * 100 + "%"

What I’m trying to do

Have an active progress bar at the top of a note, tracking progress/amount of boxes checked out of total/in percentage terms/both.

Having one at each header for the checkboxes underneath the header would be ideal too.