In a measure (SUMX) I am filtering a table and storing it in a variable.
var currency = factFx[ALPHABETIC_CURRENCY_1]
var fxRates = FILTER(
factMarketDataExchangeRates;
factMarketDataExchangeRates[FX_CURRENCY] = currency
)
Then I need to do calcs that include further filtering fxRates
var exchangeRateOnTradeDate = CALCULATE(
[Measure];
FILTER(
fxRates;
fxRates[CURVE_DATE] = tradeDate
)
)
This throws an error in SSDT Cannot find table fxRates
Also, It appears intelligence is not working. But each of the following does work. But is this expected behavior?
Without table prefix:
var exchangeRateOnTradeDate = CALCULATE(
[Measure];
FILTER(
fxRates;
[CURVE_DATE] = tradeDate
)
)
With the underlying table's prefix:
var exchangeRateOnTradeDate = CALCULATE(
[Measure];
FILTER(
fxRates;
factMarketDataExchangeRates[CURVE_DATE] = tradeDate
)
)