DDB DAX Function (Financial)

Returns the depreciation of an asset for a specified period using the double-declining balance method or some other method you specify.

Syntax

DDB ( <Cost>, <Salvage>, <Life>, <Period> [, <Factor>] )
Parameter Attributes Description
Cost

The initial cost of the asset.

Salvage

The value at the end of the depreciation (sometimes called the salvage value of the asset).

Life

The number of periods over which the asset is being depreciated (sometimes called the useful life of the asset).

Period

The period for which you want to calculate the depreciation. Period must use the same units as life.

Factor Optional

The rate at which the balance declines. If factor is omitted, it is assumed to be 2 (the double-declining balance method).

Return values

Scalar A single decimal value.

The depreciation of the asset for the specified period.

Remarks

DDB uses the double-declining balance method. The depreciation is highest in the first period and decreases in the next periods. The depreciation for a period is the smaller of these two values:

  • ( Cost – depreciation of the previous periods ) * Factor / Life
  • Cost – Salvage – depreciation of the previous periods

Therefore, the book value never goes below Salvage. With a small Factor, the book value at the end of Life can stay above Salvage. If Salvage is greater than Cost, DDB returns 0.

To use a different declining balance method, use a Factor different from 2. To switch to straight-line depreciation when it is greater than the declining balance depreciation, use VDB.

DDB rounds Period to the nearest integer. DDB returns an error if:

  • Cost is less than 0.
  • Salvage is less than 0.
  • Life is less than 1.
  • Period is less than 1 or greater than Life.
  • Factor is less than or equal to 0.

This function is not supported in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

» 4 related functions

Examples

-- DDB with the default factor 2 and with factor 1.5,
-- compared with the straight-line depreciation of SLN.
DEFINE
    VAR Cost = 10000
    VAR Salvage = 1000
    VAR Life = 5
EVALUATE
ADDCOLUMNS (
    SELECTCOLUMNS ( GENERATESERIES ( 1, Life ), "Period", [Value] ),
    "DDB Factor 2", DDB ( Cost, Salvage, Life, [Period] ),
    "DDB Factor 1.5", DDB ( Cost, Salvage, Life, [Period], 1.5 ),
    "SLN", SLN ( Cost, Salvage, Life )
)
ORDER BY [Period]
Period DDB Factor 2 DDB Factor 1.5 SLN
1 4000.0 3000.0 1800.0
2 2400.0 2100.0 1800.0
3 1440.0 1469.9999999999998 1800.0
4 864.0 1028.9999999999998 1800.0
5 296.0 720.2999999999997 1800.0

Related functions

Other related functions are:

Last update: Nov 11, 2026   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation: https://learn.microsoft.com/en-us/dax/ddb-function-dax

2018-2026 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Passed by Expression

This parameter is passed by expression and can be evaluated multiple times in different evaluation contexts.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of DDB? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.