Rollup fields as part of calculation

Hi there, maybe a bug, maybe not but as I understand rollups can be included in formula fields but I’m having lots of trouble making it happen. The below is my formula where the Holiday Taken is the rollup.

Now, the actual data backend shows like below. The calculation is 29.0 - 17.0 = 12, it reports -17. Whatever figure the holiday taken shows is the result of the formula with a minus. The odd thing is sometimes it works, sometimes it doesn’t. If I manually change the HR Allocation and save it works again.