hi! currently we face an issue with company spendings, and we wanted to calculate rolling balances per company employee (UUID)
Goal: Calculate a monthly rolling balance for each user_uuid, where:
Starting in January, spendings are subtracted from top-ups.
The remaining balance at the end of each month carries over to the next month as the starting balance.
i have tried doing following:
Monthly Balance = [top up amount] - COALESCE([Sum_account_amount], 0)
Rolling Balance = IF [Row-1: user_uuid] = [user_uuid] THEN [Row-1: Rolling Balance] + [Monthly Balance] ELSE [Monthly Balance]
however i get messed up balances always...
thank you in advance