How-to guide
How to Calculate the Cash Conversion Cycle in Power BI with DAX
A power bi cash conversion cycle measures how many days cash sits in receivables and inventory before supplier credit gives some of it back: DSO plus DIO minus DPO. It is an efficiency ratio, not a statement. Our Power BI cash flow statement guide bridges the change in working capital accounts in dollars; this article turns the same ledger balances into day counts you can trend.
The formula fits on one line, and every finance textbook prints it. What the textbooks leave open are the choices a DAX measure cannot leave open: average or ending balances, which days to count, whether revenue or credit sales goes under receivables, what to do when there is no inventory, and how a quarter column should behave. If you have already built the Power BI balance sheet from our earlier guide, the closing-balance logic below will look familiar, because the cycle reads the same receivable, inventory and payable accounts.
What is the cash conversion cycle, and how is it calculated?
The cash conversion cycle is the number of days between paying for inputs and collecting cash from customers. It equals days sales outstanding plus days inventory outstanding minus days payable outstanding. Each component divides an average balance by a flow for the same period, then multiplies by the number of days in that period.
Each part pairs one balance sheet figure with one income statement figure. The table shows where both come from in the ledger, and which sign each carries if, as in our statement guides, debits are stored as positive amounts and credits as negative.
| Component | What it measures | Balance (numerator) | Flow (denominator) | Ledger sign to handle |
|---|---|---|---|---|
| DSO — days sales outstanding | How long customers take to pay | Accounts receivable | Revenue, or credit sales where you can isolate them | Revenue is a credit, so negate it |
| DIO — days inventory outstanding | How long stock sits before it is sold | Inventory | Cost of goods sold | Both are debits; no change |
| DPO — days payable outstanding | How long you take to pay suppliers | Accounts payable | Cost of goods sold, or supplier spend | Payables are a credit, so negate the balance |
| Cash conversion cycle | Net days cash is tied up in operations | — | — | DSO + DIO − DPO |
Should you use average or ending balances?
Use the average of month-end balances across the selected period. Ending balances react to a single large invoice or payment run on the last day, while an average reflects the whole period the flow covers. In a single-month column the average equals the ending balance, and quarter and year columns smooth naturally.
None of the three methods is wrong, and published definitions differ on the choice. What matters is that DSO, DIO and DPO all use the same one, and that the report says which. If the board pack your accountant prepares uses a different method, match theirs before anyone compares the two.
| Balance method | How it is computed | Strength | Weakness |
|---|---|---|---|
| Ending balance | Balance on the last day of the period | Simplest; matches the balance sheet column | Swings with whatever posted on the final day |
| Two-point average | (Opening balance + closing balance) ÷ 2 | Common textbook approach; easy to explain | Ignores everything in between, so a year column misses seasonal peaks |
| Month-end average | Average of each month-end balance in the period | Reflects the whole quarter or year | Needs a month column on the date table; a month column shows the ending balance |
Which DAX measures calculate DSO, DIO and DPO?
A small set of measures on top of the general-ledger fact: one closing balance, three month-end averages, revenue, cost of goods sold, a day count and the three day ratios. The cash conversion cycle itself is then one line that adds DSO and DIO and subtracts DPO, with DIVIDE returning blank for empty periods.
Two model changes come first. Add a CCC Group column to the Account dimension with the values Receivables, Inventory, Payables, Revenue and COGS, leaving every other account blank. Make sure the marked date table has a Year Month column. Then, starting from the same base measure the statements use:
GL Amount = SUM ( GL[Amount] )
Closing WC Balance =
VAR _end = MAX ( 'Date'[Date] )
RETURN
CALCULATE ( [GL Amount], REMOVEFILTERS ( 'Date' ), 'Date'[Date] <= _end )
Avg AR = AVERAGEX ( VALUES ( 'Date'[Year Month] ), CALCULATE ( [Closing WC Balance], Account[CCC Group] = "Receivables" ) )
Avg Inventory = AVERAGEX ( VALUES ( 'Date'[Year Month] ), CALCULATE ( [Closing WC Balance], Account[CCC Group] = "Inventory" ) )
Avg AP = - AVERAGEX ( VALUES ( 'Date'[Year Month] ), CALCULATE ( [Closing WC Balance], Account[CCC Group] = "Payables" ) )
Revenue = - CALCULATE ( [GL Amount], Account[CCC Group] = "Revenue" )
COGS = CALCULATE ( [GL Amount], Account[CCC Group] = "COGS" )
Days in Period = COUNTROWS ( 'Date' )
DSO = DIVIDE ( [Avg AR], [Revenue] ) * [Days in Period]
DIO = DIVIDE ( [Avg Inventory], [COGS] ) * [Days in Period]
DPO = DIVIDE ( [Avg AP], [COGS] ) * [Days in Period]
Cash Conversion Cycle = [DSO] + [DIO] - [DPO]
Closing WC Balance is the inception-to-date pattern from the balance sheet; our running total DAX guide explains why it removes the date filter before applying its own. Inside AVERAGEX (opens in new tab), the CALCULATE wrapper turns each month row into a filter, so MAX ( 'Date'[Date] ) returns that month’s last day and the average is taken over true month-ends. DIVIDE (opens in new tab) returns blank rather than an error when revenue or cost of goods sold is zero.
Should DSO use credit sales or total revenue?
Use credit sales when your data can separate them, because only sales made on account ever pass through receivables. Cash and card sales in the denominator make customers look faster to pay than they are. Most general ledgers do not split the two, so the AR sub-ledger’s invoice totals are the usual source.
Three other differences between receivables and revenue are worth checking before anyone acts on the number:
- Sales tax. Receivables include the tax you billed, but revenue excludes it, so DSO reads slightly high. Either accept that and note it, or use invoice totals including tax as the denominator.
- Billing in advance. An annual invoice raises receivables on the day it is sent while the revenue is recognized month by month, so DSO jumps in billing months. Subscription businesses often measure against billings instead of revenue.
- Returns and credit memos. Map contra-revenue accounts into the Revenue group so the denominator is net of them, matching the receivable balance they reduce.
What should DIO be for a service business?
Zero, or more precisely blank. A firm that carries no inventory has no inventory balance, so DIVIDE returns blank and the cycle reduces to DSO minus DPO. The harder question is DPO, because cost of goods sold is often small or absent, which makes payables divided by it misleadingly large.
DAX treats a blank as zero in addition and subtraction, so the Cash Conversion Cycle measure keeps returning a value without any extra logic. For DPO, many service firms add a separate group for the expense accounts their suppliers actually invoice through payables, leaving out payroll, depreciation and accruals, and divide by that instead of cost of goods sold. Professional services firms often also track unbilled work in progress alongside receivables, because time recorded but not yet invoiced is cash tied up just as surely; we cover that view in our Power BI for finance builds.
Why can’t you sum monthly cash conversion cycle values?
Because each monthly value is already a number of days, not an amount. Three months at 40 days each describe a 40-day cycle, not a 120-day one. A quarter or year column has to recompute the ratio from that period’s average balances, flows and day count, which a DAX measure does automatically.
The measures above already behave correctly in a matrix: the quarter and year columns re-evaluate every average, flow and day count for their own date range rather than adding the months. The figure breaks when someone works around the measure:
- Calculated columns. A monthly cycle stored in a column, or in a summary table, gets summed by default wherever it lands on a visual.
- Averaging the months. A simple average of three monthly values gives a quiet month the same weight as a busy one, so it rarely equals the quarter’s recomputed figure.
- Exports. Monthly values exported to Excel and totalled there make the same mistake outside the model. Show the quarter and year columns in the report so nobody needs to.
Why does the current month show an unusual cycle?
Because the month is not finished. Revenue and cost of goods sold cover only the days posted so far, while the day count covers the whole calendar month. Flag closed months in the date table and filter the report to them, so every ratio compares a complete flow with a complete period.
Add an IsClosed true/false column to the date table, driven by your last closed period, and apply it as a page filter. The year column then covers only the closed months of the current year, and Days in Period counts only their days, so the ratios stay comparable with prior years. If the business wants an in-month view, build it on a separate page and label it as provisional.
Putting it together
Group the receivable, inventory, payable, revenue and cost of goods sold accounts, average the month-end balances, divide by the flow for the same closed period and multiply by its days. Decide credit sales versus revenue and the DPO denominator once, write them on the report, and let the matrix recompute quarters and years. The cycle then sits beside the cash flow statement and balance sheet on one ledger, one date table and one set of account definitions.
Related reading
Keep building your finance reports
Cash Flow Statement
The indirect method: net income, non-cash add-backs and the working capital bridge in dollars.
Balance Sheet
Closing-balance measures and the earnings plug that make the statement balance.
Power BI for Finance
Board packs, AR and AP reporting and working capital metrics, built for your team.
FAQ
Frequently asked questions
Yes. When a business collects from customers and turns its inventory faster than it pays suppliers, DPO exceeds DSO plus DIO and the cycle drops below zero. That means suppliers are funding part of working capital. In Power BI no special handling is needed, though a format string that shows negatives clearly helps readers.
Use the actual number of days in the selected period, counted from the date table, so a 28-day February and a 31-day March are each measured against their own flow. A fixed 365 or 360 only works for annual figures. Whichever convention your finance team prefers, apply it to all three ratios.
No. An aging report sorts open invoices into buckets such as current, 30, 60 and 90 days past due, and it works from the AR sub-ledger invoice by invoice. DSO is a single ratio of the receivable balance to revenue. Aging tells you which customers to chase; DSO tells you whether collection is speeding up overall.
No. Every balance and flow in the cycle comes from general ledger control accounts and the income statement, so the same fact table that feeds your balance sheet is enough. Sub-ledgers help only when you want credit sales instead of total revenue, or a breakdown by customer or supplier.
Want working capital days your finance team trusts?
Bring your chart of accounts to a free demo. Grouping the accounts, settling the balance and denominator choices with you, and checking the first quarter against your own workbook is exactly the kind of task prepaid Flex hours cover — we scope it, you approve, and most focused builds land in 3–5 business days.
Scope approved before any hours are used · Hours never expire
Tell us the task. We scope it, you approve, and a senior consultant delivers — typically in 3–5 business days. Prepaid hours that never expire.
- Prepaid hours from $100/hour — and they never expire
- Senior-led delivery — 20+ years on the Microsoft platform
- Typical 3–5 business day turnaround
- Full refund if you’re unhappy in your first 4 hours