英文:
Calculate a forward rate using measure
问题
"Forward Rate" 指的是每一行的计算方式,即 Discount Factor 当月 / Discount Factor 前一个月 - 1。
您尝试使用以下公式,但似乎不起作用:
Forward Rate = SUMX(facYieldCurves,
IFERROR(
DIVIDE(LOOKUPVALUE(facYieldCurves[Discount Factor], facYieldCurves[Month] , [Month] - 1) , [Discount Factor]),0))
英文:
I have a table of the following format:
I need to calculate a "Forward Rate" measure for each row, which = Discount Factor Current Month / Discount Factor Proceeding Month - 1.
I have tried the following measure but it does not work:
Forward Rate = SUMX(facYieldCurves,
IFERROR(
DIVIDE(LOOKUPVALUE(facYieldCurves[Discount Factor], facYieldCurves[Month] , [Month] - 1) , [Discount Factor]),0))
答案1
得分: 1
你的意思是这样吗?
Measure =
IF(HASONEVALUE('Table'[Month]),
DIVIDE(
MAX('Table'[Discount Factor]),
CALCULATE(MAX('Table'[Discount Factor]), REMOVEFILTERS(), VALUES('Table'[Curve]), 'Table'[Month]=MAX('Table'[Month])-1),
0
)
)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论