Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |