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))
>Solution :
You mean like this?
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
)
)

