if you want to show a row by row changing you can do this via a Running Total or a shared variable formula.
For either you can add an evaluate condition or create a formula field that evaluates first then adds that result.
create a formula field called "B_updated" (or whatever you want)
//B_updated
If A>0 then B else 0
Create a Running Total
name = Bsum
field to summarize=B_updated
type = sum
evaluate= for each record
reset=never (unless you have group level sums you want)
place in the detail section and/or footers