A formula that returns a number but for some notes returns null makes the formula column mixed types which can’t be summarized mathematically. Solution is for the formula to return zero for those empty notes. But a lot of zeros makes the column harder to read, less clean.
Proposed solution
I would like the option similar to tables and spreadsheets for zero values to be visually blank.
Making that mandatory would cause trouble for columns intended to display nulls differently than zeros. Lots of times, a person wants to see a zero when the value is zero and a blank when the value is nonexistent.
The formula
if(myProperty, 1)
with the summary
values.sum()
in a vault where two notes contain the Front Matter
---
myProperty: true
---
will summarize to 2 even when the formula resolves to null for other notes in the base. The nulls appear blank.
If you have a formula that relies on the presence of a number and the summary is factoring in non-numbers in an unexpected way, you can safeguard it in the summary. For example:
values.filter(value.isType("number")).sum()
I think the above addresses your core issue, but in case I misinterpreted, I can directly respond to your post’s title too,
as the title jumps ahead to the second stage of a solution based on implementing a first stage:
If you already have number values equal to zero and want them to appear blank in the table, you can have the formula make them null. An example is
if(formula.example != 0, formula.example)
Or have the formula make them blank. An example is
if(formula.example == 0, "", formula.example)
Both of those can be handled in formulas, filters, and summaries per the above.