Count back for turnover
I've come across a task to count some KPI's based on count back method.
For instance, I need to count how many days it takes a company to cover its Account Receivable (AR) amount with monthly Revenues.
It means that if a company has AR at Jan end = $ 2000 and Revenues as:
current month (Jan) = $ 200
month-1 (Dec)= $ 400
month-2 ( Nov) = $ 600
month-3 (Oct) = $ 700
month-4 (Sep) = $ 500
then as per this methodology AR turnover in days will be = 31 (Jan) + 31 (Dec) + 30 (Nov) + 31 (Oct) + 6 (Sep) [30 (Sep) * 100(remaining AR to be covered by Sep revenue) / 500 (Sep revenue)] = 129 days
Could you please recommend the best way to calculate such things if I have model where the lowest time frame is month and this indicator is to be calculated for each month?