Filter doesn't update when formula changes data

Hi,

The calc file that I’m having trouble with is for keeping track of changes in stock of products (up or down).
I have a formula in column D that checks if the user has put a product name in column A on the same row. If that’s not the case. It should show the total of all the prices. (It check if the cell in the column A above the current row isn’t empty so that it only shows the total once in the column).

Problem is that when I try to export this as a pdf I don’t want it to show all the rows that have no products in them. (It currently does show them simply because there is a formula inside of every cell in Column D even if the result is " ".

My attempt was to let it the result be ‘DONTPRINT’ if it should be blank and have it be filtered out using a ‘standard filter’ and this works. But when I try to add another product it doesn’t update.
If I put something in A29 for example. The totaal should move down one row but now it disappears because the filter hid the row below it.

I hope you understand what I mean. If not. Feel free to comment.

PS. Here is a video of what happens on my computer. Please put annotations on so you can see my commentary
https://www.youtube.com/watch?v=isLcSrSb-5A

ALSO I just noticed that the total at the bottom doesn’t update for some reason

Thanks in advance!

See example file from video

Version: 5.1.0.3
Build ID: 5e3e00a007d9b3b6efb6797a8b8e57b51ab1f737
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default;
Locale: nl-BE (nl_BE)