DB DAX Function (Financial)

Returns the depreciation of an asset for a specified period using the fixed-declining balance method.

Syntax

DB ( <Cost>, <Salvage>, <Life>, <Period> [, <Month>] )
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.

Month Optional

The number of months in the first year. If omitted, it is assumed to be 12.

Return values

Scalar A single decimal value.

The depreciation of the asset for the specified period.

Remarks

DB uses the fixed-declining balance method. The depreciation of each period is a fixed rate of the book value at the start of the period. The rate is 1 – ( Salvage / Cost ) ^ ( 1 / Life ), rounded to three decimal places.

The depreciation for a period is ( Cost – depreciation of the previous periods ) * rate. The first and the last periods are special cases:

  • The depreciation of the first period is Cost * rate * Month / 12.
  • When Month is less than 12, there is one more period after Life. The depreciation of this last period is ( Cost – depreciation of the previous periods ) * rate * ( 12 – Month ) / 12.

Because the rate is rounded, the book value at the end can be different from Salvage. If Salvage is greater than Cost, DB returns a negative value.

DB rounds Period and Month to the nearest integer. DB 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. When Month is less than 12, Period can also be Life + 1.
  • Month is less than 1 or greater than 12.

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

» 4 related functions

Examples

-- Depreciation schedule of an asset that starts on June 1.
-- The first year has 7 months, so a life of 5 years has 6 periods.
DEFINE
    VAR Cost = 10000
    VAR Salvage = 1000
    VAR Life = 5
    VAR FirstYearMonths = 7
    VAR Periods =
        SELECTCOLUMNS ( GENERATESERIES ( 1, Life + 1 ), "Period", [Value] )
EVALUATE
ADDCOLUMNS (
    Periods,
    "Depreciation", DB ( Cost, Salvage, Life, [Period], FirstYearMonths ),
    "Book Value",
        VAR CurrentPeriod = [Period]
        RETURN
            Cost
                - SUMX (
                    FILTER ( Periods, [Period] <= CurrentPeriod ),
                    DB ( Cost, Salvage, Life, [Period], FirstYearMonths )
                )
)
ORDER BY [Period]
Period Depreciation Book Value
1 2152.5 7847.5
2 2895.7275 4951.7725
3 1827.2040525 3124.5684475
4 1152.9657571275 1971.6026903724996
5 727.5213927474524 1244.0812976250472
6 191.27749950985103 1052.8037981151956

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/db-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 DB? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.