Databases Reference
In-Depth Information
Do this instead:
FIX(@IDESCENDANTS("Calendar Periods" AND
@LEVMBRS("Calendar Periods",0))
Any Calculation Function;
ENDFIX
In the following examples, we will show you how to narrow down the amount
of data you will calculate in your database for various scenarios.
Basic FIX and ENDFIX examples
To begin with, as mentioned earlier, FIX and ENDFIX commands can be nested. We
have also given you some tips regarding when to use the FIX and ENDFIX commands
and what to avoid when nesting them, like the same dimensions named in separate
FIX commands.
For starters, this is how you would code the simplest of FIX and ENDFIX commands:
FIX(@IDESCENDENTS("Calendar Periods"))
"Gross Stock" = "Production" - "Sales";
ENDFIX
Notice how the FIX command has an area to list selection dimensions. Within the
parenthesis you can list multiple dimension names separated by commas, member
names, or a list of member functions that returns member names. There are also
functions that return members at specific levels in the outline. You can even use basic
structuring similar to a mathematical formula with AND / OR statements bracketed by
extra parenthesis.
In the example immediately above, notice how we are calculating the value for
Gross Stock for all Calendar Periods . If your database was extremely large, with
several years of historical data in it, this would be inefficient to always calculate the
entire Time dimension.
Now, suppose you added User Defined Attributes ( UDA s) to the periods in the time
dimension and only wanted to calculate current periods? Here is what you would do:
1.
Add UDAs of Historical , Current , and Forecast to the individual year
members and their children in the database outline. For example, if the
current calendar year is 2009, then 2009 and all of its children would have
the UDA of Current added to them in the outline. All years and their
children prior to 2009 would get the UDA of Historical . All years and their
children later than 2009 would get the UDA of Forecast added in the outline:
 
Search WWH ::




Custom Search