Webi sum details to see what adds to 0

So I have a report with detail lines. Those can have + or - quantities (in and outgoing transactions).

Now I want a way to exclude the lines from the materials that add up to 0 .
(cannot do it on a report levels as there are also other value dimensions that won’t add up to zero)

Was thinking about a formula that would sum the total amount by material with a foreach([Material]).
But in the detailed view it will give me the same total as the normal total amount field in that line.
Also using fields in a ‘higher’ level then material will not make the formule give me a total instead of the detailed amount.

What would be the best formule to make a total in a detailed line where that total is the same for every detail line.
Because the lines that then show 0 are lines I can filter out.

You’re going to need to provide sample data that better illustrates what you are looking to do here. You’ll definitely need to use context calculations, but without seeing what the data looks like, the columns, rows, what you are trying to sum, it’s impossible to say what you need to do.

“foreach” is adding dimensions to the context,
you have to use “forall” to remove dimensions from the view to get total amount