Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
How can I using DAX to calculate the DURATION function equal to that of Excel. DURATION(Settlement, Maturity, Coupon, Yld, Frequency).
Solved! Go to Solution.
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:
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 ) )
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.
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:
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 ) )
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 32 | |
| 27 | |
| 25 |