One shortcoming of the accepted answer is that it won't work with grouped stacks, because you'll get the total for all stack series, not just the series in each group.
Here is a function that works for grouped stacks (not that it's pretty):
function() {
var stackItem = this;
var allStacks = stackItem.axis.stacks;
for (var key in allStacks) {
if (allStacks[key][stackItem.x] == stackItem) {
var oppositeKey = stackItem.isNegative ? key.slice(1) : '-' + key;
var oppositeItem = allStacks[oppositeKey] && allStacks[oppositeKey][stackItem.x];
if (oppositeItem === undefined) {
if (stackItem.total != 0.0) {
return Highcharts.numberFormat(stackItem.total, 0);
}
} else {
var sum = stackItem.total + oppositeItem.total;
if (stackItem.isNegative ^ sum > 0) {
return Highcharts.numberFormat(sum, 0);
}
}
}
}
};
N.b. I'm passing this
from the formatter.
Here is a working example.