DURATION DAX Function (Financial)
Returns the Macauley duration for an assumed par value of $100. Duration is defined as the weighted average of the present value of cash flows, and is used as a measure of a bond price’s response to changes in yield.
Syntax
| Parameter | Attributes | Description |
|---|---|---|
| Settlement |
The security’s settlement date. The security settlement date is the date after the issue date when the security is traded to the buyer. |
|
| Maturity |
The security’s maturity date. The maturity date is the date when the security expires. |
|
| Coupon |
The security’s annual coupon rate. |
|
| Yld |
The security’s annual yield. |
|
| Frequency |
The number of coupon payments per year. For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4. |
|
| Basis | Optional |
The type of day count basis to use. |
Return values
The Macaulay duration of the security, in years.
Remarks
Basis sets the day-count method. Use 0 or omit the value for US (NASD) 30/360. Use 1 for actual/actual. Use 2 for actual/360. Use 3 for actual/365. Use 4 for European 30/360.
The result is in years. For a zero-coupon security, the duration is equal to the time to maturity. Use MDURATION to get the modified duration.
Settlement and Maturity are truncated to integers, so the time part of a date is ignored. Frequency and Basis are rounded to the nearest integer. A BLANK Basis is the same as 0. A BLANK Settlement does not return an error: it is treated as 30-Dec-1899 (the zero date), so the result is computed from that date.
DURATION returns an error in these conditions:
- Settlement or Maturity is not a valid date, or Maturity is BLANK.
- Settlement is equal to or later than Maturity.
- Coupon is less than 0.
- Yld is less than 0.
- Frequency is BLANK or, after rounding, is not 1, 2, or 4.
- Basis is less than 0 or greater than 4.
This function is not supported in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.
Examples
-- Duration of a bond bought on March 10, 2025, that matures
-- on November 15, 2035, for each day count basis.
-- Coupon is 5%, yield is 6%, and coupons are paid twice a year.
EVALUATE
VAR Settlement = DATE ( 2025, 3, 10 )
VAR Maturity = DATE ( 2035, 11, 15 )
VAR Coupon = 0.05
VAR Yld = 0.06
VAR Frequency = 2
RETURN
ADDCOLUMNS (
{
( 0, "US (NASD) 30/360" ),
( 1, "Actual/actual" ),
( 2, "Actual/360" ),
( 3, "Actual/365" ),
( 4, "European 30/360" )
},
"DURATION", DURATION ( Settlement, Maturity, Coupon, Yld, Frequency, [Value1] )
)
| Value1 | Value2 | DURATION |
|---|---|---|
| 0 | US (NASD) 30/360 | 8.151994983820972 |
| 1 | Actual/actual | 8.153759870254367 |
| 2 | Actual/360 | 8.151994983820972 |
| 3 | Actual/365 | 8.156370935114731 |
| 4 | European 30/360 | 8.151994983820972 |
Related functions
Other related functions are:
Last update: Nov 13, 2026 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://learn.microsoft.com/en-us/dax/duration-function-dax