DB DAX Function (Financial)
Returns the depreciation of an asset for a specified period using the fixed-declining balance method.
Syntax
| 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
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.
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