Inline Dataview

What I’m trying to do

I’m trying to create a statistical element for my Home page to reflect certain statistics using the inline dataview feature.

The specific issue is where I want to exclude the classes I’ve not completed yet from the equation. The following would be one of those YAML headers:

tags: Uni, ClassOverview, C172
classCode: C172
credits: 3
term: 1
startDate: 2023-06-12
professor: ProfessorName

Currently, I’m using the following inline dataview code, repurposed from a few websites and the fromSergio video below.

`$=dv.pages('#ClassOverview AND -"endDate"').credits.array().reduce((acc, val) => acc + val, 0)`

I believe understand most of the elements of this and was able to run the code with only the #ClassOverview criteria.

How do I insert a condition of “AND endDate is not Null”.


This runs but also includes the classes I’ve not completed.

Things I have tried

I’ve searched throughout both the Dataview documentation and this forum, but I can’t figure out how to get this to reflect.

The following video is my source:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.