have you tried ifnull(sum([headcount]),previous_value(0))
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
Thanks a lot, that worked spot on. I have come up with another solution in the meantime, which I guess is very similar:
IF ISNULL(SUM([Headcount])) THEN LOOKUP(SUM([Headcount]),-1)
yes they are equivalent what ifnull does is if the value is NOT null it uses the value - if it is null it uses the second argument
Glad to help out