Have you ever needed to convert an alias back to the original element name within an IBM Planning Analytics TurboIntegrator script? Maybe you have a data source where the value entails an alias but further logic references the element code.
You can do this by unconverting an element via the DimensionElementPrincipalName function. The DimensionElementPrincipalName function returns the true element code (called the “principal name”) of an element. The function allows you to reference the element using any allowable reference … the original element or any alias value.
The syntax of the command is:
DimensionElementPrincipalName (dimName, elementName)
The following details exist in a dimension called Names:
DimensionElementPrincipalName (‘Names’, ‘Johnny’) will result in the value ‘John’
This can be used in conjunction with logic in your load script. If I have a source file with a person’s name, then I don’t know if the data will include John or Johnny. I can therefore create logic to convert the input value back to the element name via the following code snippet:
IF (DimensionElementPrincipalName (‘Names’, InputValue) @= ‘John’)
Note: the InputValue would be written as a CELLGETx pull
The use of this function will allow you to have a single point of reference to an element, no matter how many aliases exist.
IBM Planning Analytics, powered by TM1, is full of new features and functionality. Need advice? Our team here at Revelwood can help. Contact us for more information at firstname.lastname@example.org. We post new Planning Analytics Tips & Tricks weekly in our Knowledge Center and in newsletters!