Description:
The LITERAL function reads any text value given as the parameter and reads this value "literally" as text, without interpreting the special characters in the text values. In PowerOLAP it is possible to check the box for allow reserved characters, and this allows the user to use reserved characters while giving names for meta-data. This means that the user can now create dimension names and member names and cube names that may contain certain reserved characters that are used to interpret formulas in PowerOLAP. Reserved characters are such as "{}", ".", and other such special characters that are also normally used in defining a formula in PowerOLAP. However, these characters can also be used in meta-data names in PowerOLAP if the user wishes to use these characters. The Literal function will be used when such a member name / dimension name will be used in a formula. This means that if a formula refers to a name that has a reserved character in it, the formula engine will read that character as a formula character and will not treat it as part of text, unless the LITERAL function forces it to do that.
Syntax: LITERAL (Text)
Remarks
Example
=Literal ("MetaData.Jan*month") |
- returns the text value to the function. The text given to the function may be a value that has reserved characters, and the function will interpret that character as text alone. The reserved character here,"*" will be treated as part of a text value and will not be interpreted by the formula engine as any character that is part of the characters read by the formula engine. |
Let us take the example of a cube in PowerOLAP which requires data that resides in another member of the cube. Let us assume that the member from where the data is being pulled in is a member whose name contains one or more reserved characters. If in some dimension in some member of a cube, you want to display this accessed value from the other member whose name is supplied to the function then it is appropriate to use the LITERAL function to access the value from a member whose name contains one or more reserved characters. In this case we can write a formula in the cube in PowerOLAP to access this value from a member name that cannot be given to the function ordinarily, but which can be referenced using the LITERAL function. LITERAL is the function that one can write to access the literal text value for a member name. This value accessed may be needed to populate another member that is supposed to hold this value as fact data. It is therefore important to read the member name that holds the value that is being assigned to another member also, and this can be done by using the LITERAL function that reads the member names and treats the special characters as part of the text of the member name.
The screen above shows a formula for the LITERAL function.
The formula writes a value into the "MetaDataValues" dimension, into the "Literal" member. In the formula, the value that is being populated into the Literal member is being pulled in from the member called "Lit.Mem". Because this member has a period ("."), in its name that's why the LITERAL function is required, to take the member name as a parameter and then return the member name simply as text to the formula so that the value from the "Lit.Mem" member can be assigned to the "Literal" member.