Forum Discussion
charlkeet
7 years agoNew Member
include variable costs in portfolio backtest
Hi I'm fairly inexperienced in using measures and ran into the following issue: I am building a equity portfolio backtest dashboard, the backend is a list of dates and monthly returns (about 30 ...
AlB
7 years agoCommunity Champion
Hi charlkeet
EARLIER CAN be used in a measure. The issue here is that when your "Fund_nav" code is in a calculated column, you have the row context 1 from the table where "Fund_nav is place", as usual in calculated columns, and row context 2 from your FILTER( ) invocation.
If you place that code in a measure, the only row context will be that stemming from FILTER( ) and thus, calling EARLIER( ) will yield an error (no nested row contexts in this case).