How do I calculate a value from a list of objects and display it?

I made it a little better. I’m not sure how to remove the excessive white space though :sweat_smile:

EDIT: Whitespace. The problem was the whitespace. The template directive literally interpretted linebreaks. But then, when everything was bunched together, a blank row was added to the table. Solution: Wrap the table in comments #

{{#let @allExercises = {exercise}}}
{{#let @allExerciseWeeks = {exercise select week}}}
{{#let @uniqueExerciseWeeks = uniqueNumbers(@allExerciseWeeks)}}
{{#each @weekNumber in @uniqueExerciseWeeks}}
{{#let @exercisesThisWeek = count({exercise where week = @weekNumber.week})}}
{{#each {rubric-exercise}}}
{{#if value = @exercisesThisWeek}}
#
|Week of | Days Exercised|Rubric|
|--------|---------------|------|
|{{weekStartFromWeekNumber(@weekNumber.week)}}|{{@exercisesThisWeek}}|{{score}}
#
{{/if}}
{{/each}}
{{/let}}
{{/each}}
{{/let}}
{{/let}}
{{/let}}