This function renames an alias of a particular dimension
member in PowerOLAP directly from an excel environment.
The OLAPRenameAlias function allows you to change
the name of an alias of any member of a specified dimension, in a
specified database in two ways. First, you can choose to simply specify
the first four parameters and, as a result, this function will return
the particular alias name, and by double clicking on the cell where
the alias name is returned, this will show a Rename Alias dialog box
where you can type in the new alias name. Another method is by specifying
a fifth parameter, which is the new alias name which will automatically
change the alias name back in your PowerOLAP database.
The function has the following syntax:
Syntax: OLAPRenameAlias
(database, dimension, group, member, new name (optional 5th parameter))
Explained below are the 5 parameters that have to
be entered when building this function.
- Database : Enter the name of the database which
has the dimension and alias group that you want to access / enter
the cell reference which has the name of this Database.
- Dimension : Enter the name of the dimension
in the specified database which has the Alias Group you want to
access / enter the cell reference which has the name of such a
dimension.
- Group : Enter the name of the Alias Group you
want to access that exists in the dimension and database that
was specified / enter the cell reference which has the name of
such an alias group.
- Member : Enter the member name of the alias
in the above mentioned Alias Group within the specified dimension
of the specified database / enter the cell reference which has
the member name.
- New Name : Enter the new name that would replace
the original alias name.
Remarks
- If a connection is not established with a database
the result will be a #value.
- There must be the same alias group existing
in the database as entered for the Group parameter above.
- Be sure to enclose the new name in double quotes,
should you opt to specify a 5th parameter(").
- Only the 5th parameter is optional, the rest
of the arguments are required.
Example
This function may be easier to understand with an
example.
- In order to build this function with more ease,
open the specific database and bring a slice from that database
into excel. In this way you will have connected to PowerOLAP because
you now have the OLAPOpen formula automatically on your sheet
when you bring a slice of the cube into Excel.
- In Excel, use the menu: Insert -> Function
and select PowerOLAP from the drop down list.
- Choose the OLAPRenameAlias function from the
list of functions provided and click "Ok".
- When building the formula enter the cell range
for the database name, the dimension name and type in the name
for the alias group in that database as well as the member carrying
that alias. Lastly, type in the new alias name for your dimension
member. If you don't want to manually enter the alias group name
you can use another function called OLAPAliasGroup in a cell to
get the alias group name/names and then use that cell as a reference
for a formula.
- For example, in the Months dimension, we want
to change the alias of January from "Jan" to "Jan-01".
The formula can be written as follows: B2 is the cell that holds
the database name (UsingPO), B6 is the cell that holds the dimension
name (Months), "Abbreviation" is the name of the Alias
Group, "January" is the member name and "Jan-01"
is the new alias name.
=OLAPRenameAlias($B$1,$B$6,"Abbreviation",
"January","Jan-01") |
The formula will return the new alias name,
which is also written back or reflected in the PowerOLAP database.