Database Reference
In-Depth Information
At this point we still need to have a row containing a rate of 1 for US Dollars for
each day in the
Date
dimension. Thus, USD values are still converted to USD using
the
MeasureExpression
property, even if it is not really necessary. However, in
this case we can optimize the conversion using the
DirectSlice
property of the
many-to-many dimension relationship that relates the Currency dimension to our
Transactions measure group.
DirectSlice property
The
DirectSlice
property of a many-to-many dimension relationship can
be set to contain an MDX tuple. When that tuple is selected in a query the
MeasureExpression
property will be ignored and the raw measure value will be
returned instead. In other words, for certain parts of the cube we want the original
value of the measure instead of the calculated value returned by the expression in the
MeasureExpression
property. For example, we can skip the
MeasureExpression
calculation when the Reporting Currency is the same as the Pivot Currency, which is
USD in our example. This has two consequences:
•
First, there is no need to put rows in the Exchange Rate fact table containing
the rate 1 for US Dollars for each day.
•
Second, when the user requests the USD Currency and looks at data that
is stored as US Dollars in the fact table, the query response will be faster
because there is no need to resolve the many-to-many relationship or
perform any currency conversion.
Please note that we cannot use MDX functions to build dynamic expressions in the
DirectSlice
property, we can only write an explicit tuple such as
([Currency].
[Currency].&[USD])
.
Writeback
As we mentioned earlier, when working with exchange rates our users may need
to do "what-if" analysis to see what the impact of different exchange rates would be
on the company's profitability. We can let our users do this by "write-enabling" a
measure group: on the
Partitions
tab of the Cube Editor, right-click on any partition
within the measure group and select
Writeback Settings
to display the
Enable
Writeback
dialog.
Search WWH ::
Custom Search