EnableYourData.com

KPI · Finance

Days sales outstanding (DSO): formula and example.

Days sales outstanding (DSO), also known as debtor days, is the average number of days between issuing an invoice and receiving payment from the customer. You calculate it by dividing outstanding trade receivables by revenue and multiplying by the number of days in the period. The higher the DSO, the more cash is tied up with customers.

Days sales outstanding (DSO) formula

Outstanding trade receivables ÷ revenue for the period × number of days in the period

Worked example

At the end of 2025 Acme Groothandel had €1,500,000 of outstanding receivables. Revenue for 2025 was €12,000,000. DSO is €1,500,000 ÷ €12,000,000 × 365 = 45.6 days.

Fictitious figures for Acme Groothandel, a sample wholesaler.

How to read this KPI

A rising DSO means customers are paying later or more is sold on credit, so more working capital is needed. Compare DSO with your own payment terms: if it is well above them, customers are consistently paying late. Also track the trend by month and by customer segment; what is reasonable depends on your sector and agreed terms.

Pitfalls with days sales outstanding (DSO)

  • Dividing receivables including VAT by revenue excluding VAT, which overstates DSO.
  • Using a single day's balance, when one large invoice just before or after that day changes the picture.
  • Using annual revenue when the business is growing fast or is seasonal, so DSO lags behind; use recent months instead.

SQL & DAX

Calculating days sales outstanding (DSO) in SQL and DAX

Two examples on a fictitious data warehouse for Acme Groothandel: a PostgreSQL query and a measure for a Power BI model. Adjust table and column names to your own model.

SQL · PostgreSQL
WITH revenue AS (
  SELECT SUM(amount) AS revenue_365d
  FROM gl_entries
  WHERE account_group = 'revenue'
    AND entry_date > current_date - interval '365 days'
), receivables AS (
  SELECT SUM(open_amount) AS open_receivables
  FROM invoices
  WHERE open_amount > 0
)
SELECT receivables.open_receivables,
       revenue.revenue_365d,
       ROUND(receivables.open_receivables / NULLIF(revenue.revenue_365d, 0) * 365, 1) AS dso_days
FROM receivables, revenue;
DAX · Power BI
Open Receivables = CALCULATE(SUM(Invoices[OpenAmount]), Invoices[OpenAmount] > 0)

DSO (days) =
VAR Revenue365 = CALCULATE(SUM(GL[Amount]), GL[AccountGroup] = "revenue", DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -365, DAY))
RETURN DIVIDE([Open Receivables], Revenue365) * 365

In ENABLE

Tracking this KPI in ENABLE

Plain-language questions

Ask for days sales outstanding (DSO) per month, customer or product in the SQL Explorer with AI. The AI writes the SQL, you see the query and run it yourself; the AI only receives metadata.

Read more →

In your Power BI dashboard

Define the KPI as a measure in your Power BI model and show it in the portal, with "Last refreshed" next to it. Access profiles and optional row-level security decide who sees which figures.

Read more →

Custom dashboards (pilot)

Add the KPI as a tile to a custom dashboard, compared with last year. The Dashboard Builder is a pilot and can be switched on per client.

Read more →

Monthly targets

With the built-in Targets app you set a target for the KPI per month, so you see actuals and target side by side.

Read more →

FAQ

Frequently asked questions

How do you calculate days sales outstanding?

Divide outstanding trade receivables by revenue for a period and multiply by the number of days in that period. With €1,500,000 of receivables and €12,000,000 of annual revenue, DSO is 1,500,000 ÷ 12,000,000 × 365 = 45.6 days. For a monthly or quarterly figure, use that period's revenue and number of days.

What is the difference between DSO and payment terms?

Payment terms are what you agree with customers, DSO is how long they actually take to pay on average. If DSO is clearly above your terms, customers are paying late on average or your credit control is not keeping up.

How can you reduce DSO?

You reduce DSO by invoicing faster and without errors, agreeing shorter terms and sending reminders on time. A list of overdue invoices per customer helps you chase payment in a targeted way. Direct debit or prepayment for new customers also shortens the average collection period.

Use AI on your own data. Securely, and without the headache.

In an online demo we show how ENABLE makes your data securely available and how you build on it: describing an app in the AI Builder, plain-language questions, dashboards and APIs. And how we set it up and manage it for you.