Special characters in SSAS Name propertiesPosted: November 29, 2012
Have you ever got the request to use special characters, like ( ) / \ & %, in the names of your measures or dimension attributes in your multidimensional cube, but only to find that the Name property will not accept this? There is a way to implement this even though it is not done on the Name property but involves Translations.
I am not going to cover the use of Translations in this blog post, which I expect you are already familar with, but simply go though how special characters can be implemented in order to help the users to understand what is really behind the measures.
Let’s say that I wanted to rename my Sales Unit Price, so that we in the name clearly stated that it is actually the total cost averaged by the quantity.
If I try this simply by renaming, I will get an error telling my that it is an invalid name:
But as mentioned it is possible to use special characters if we are using them in our translations.
This will not cause any errors and we will now be able to present the measure with our special characters in it. Notice that we are now able to present our measure in a way so that it is more understandable from a users perspective.
In this example I have used the Sales measure group. Another scenario could be that we have a measure called Weight. In such a case we it is probably less obvious what that really is. So in that case it makes sense to include that in the name. Eg. “Weight (Kg)” or “Weght (Oz)”.
But be aware that you should truly understand the use of Translations before introducing this method. Otherwise a simpler method is to name it like ‘”Weight in Kg”, replace % with “pct.” etc.
But in some cases the name could be quite long. Let’s say we want to clarify what the measure Speed really is. With translation it can be “Speed (m/s)” but with a renaming of the Name property it would be something like “Speed in meters per second”.