Using a nested DB function

The rule statement in the rule for the Purchase cube uses nested DB functions to calculate the value of Price/Kg - USD based on the current exchange rate in a given market.

['Price/Kg - USD']=['Price/Kg - LC']\DB('CurrencyExchangeRate',DB('Currency',
!market,'MarketCurrency'),!date);