Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PAULO
Regular Visitor

Excel function DURATION to DAX

How can I using DAX to calculate the DURATION function equal to that of Excel. DURATION(Settlement, Maturity, Coupon, Yld, Frequency).

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi PAULO,

 

As  I know, there is no direct function to calculate duration in Powerbi, one workaround is that you could calculate this in Excel, then import these data in powerbi. Or I  think you need to create calculated column based on its function logic. You could refer to Bond duration(step by step example), bring the fields into the formula

For Example:

206.PNG

Measure 12 =
 ( 1 * 0.05 / ( 1 + 0.05 ) + 2 * 1.05 / ( 1 + 0.05 ) * ( 1 + 0.05 ) ) / ( 0.05 / ( 1 + 0.05 ) + 1.05 / ( 1 + 0.05 ) * ( 1 + 0.05 ) )

22.png

23.png

Because there is no direct function in powerbi, so if your store year* freq >5, it will more complex, you need to write long expression. So I suggest you calculate this in Excel then import in powerbi

 

Best Regards,

Zoe Zhi

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
dax
Community Support
Community Support

Hi PAULO,

 

As  I know, there is no direct function to calculate duration in Powerbi, one workaround is that you could calculate this in Excel, then import these data in powerbi. Or I  think you need to create calculated column based on its function logic. You could refer to Bond duration(step by step example), bring the fields into the formula

For Example:

206.PNG

Measure 12 =
 ( 1 * 0.05 / ( 1 + 0.05 ) + 2 * 1.05 / ( 1 + 0.05 ) * ( 1 + 0.05 ) ) / ( 0.05 / ( 1 + 0.05 ) + 1.05 / ( 1 + 0.05 ) * ( 1 + 0.05 ) )

22.png

23.png

Because there is no direct function in powerbi, so if your store year* freq >5, it will more complex, you need to write long expression. So I suggest you calculate this in Excel then import in powerbi

 

Best Regards,

Zoe Zhi

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.