Columns with no data still displayed despite "Show missing values" disabled

Columns with no data still displayed despite "Show missing values" disabled

I have a table with missing data, but columns are still being displayed even though the "Show missing values" option is disabled.

The table contains 3 columns split across 12 months. I suspect the issue is caused by one of the columns using an aggregation formula with a CASE WHEN condition.

The logic is basically: if the previous column is NULL, then this one is also NULL. This was my attempt to reduce the number of visible columns.

However, even when the result is NULL, the columns are still shown. I would expect them to be hidden when there is no data.

Here’s roughly what the formula looks like:
CASE WHEN [column1] IS NULL THEN NULL ELSE ... END
In the screenshot, I showed how it looks. The last column was always visible before I added that condition.
Does anyone know how to prevent columns with no data from being displayed in this case? Any ideas or workarounds would be appreciated.