Description:
This function capitalizes the first letter in a text string and any other letters in text that follow any character other than a letter. It converts all other letters to lowercase letters and returns this value as the result.
Syntax: PROPER (Text)
Remarks
Example
The Proper function can be used in any database where you have stored any text values and you want to convert that text into properly written text with the first letter of every word as a capital alphabet and the remaining letters as small letters. The function reads the entire text value and it converts all the words in the text value as words with the first alphabet capital and the remaining as small. The function returns the extracted text as the result of the function.
This function returns this changed text value as its result after the function computes the text parameter.
=PROPER ("pENNSylvANIA") |
-returns the text value with the first letter capitalized for each word ("Pennsylvania ") |
=PROPER ("swiTZERLand") |
-returns the text value with the first letter capitalized for each word ("Switzerland ") |
Note: A number supplied within double quotes is taken as a string parameter.
Let us take the example of a database in PowerOLAP where we have certain text values for name, last name, city, country etc., and we need to manipulate these text values and arrive at results with different permutations and combinations. We shall use this example in this case to convert a specified text value given as the parameter to words which have the first alphabet capitalized. In this example we have written a formula in the appropriate cube in PowerOLAP, pulling in the value from the member "Continent" given as a parameter and then converting the value to a Proper value. A text value is returned as the result for the PROPER function.
The formula above writes values into the "StringDataFunctions" cube to the "String Data Manipulations" dimension into the member named "PROPER" by calculating the appropriate value for this member, based upon the text parameter that is given as input to this function, namely the reference for the "Continent" member and the function converts any value given as a parameter into a PROPER word which has the first alphabet capitalized and the rest. The result returned is this "Proper" value as text.