You can increase the user-friendliness of the measures in a cube by using the FormatString property for each measure to define formatting settings that control how the measures are displayed to users. In this task, you specify formatting properties for the currency and percentage measures in the Analysis Services Tutorial cube.
To modify the measures of the cube
Switch to the Cube Structure tab of Cube Designer for the Analysis Services Tutorial cube, expand the Internet Sales measure group in the Measures pane, right-click Order Quantity, and then click Properties.
In the Properties window, click Auto Hide to pin the Properties window open.
It is easier to change properties for several items in the cube when the Properties window remains open.
In the Properties window, in the FormatString list, select #,#.
On the toolbar of the Cube Structure tab, click Show Measures Grid.
Changing to the grid view lets you select multiple measures at the same time.
Select the following measures, by holding down the CTRL key to select multiple measures:
- Unit Price
- Extended Amount
- Discount Amount
- Product Standard Cost
- Total Product Cost
- Sales Amount
- Tax Amt
The following image shows the Cube Structure tab with these measures selected.
In the Properties window, in the FormatString list, select Currency.
In the drop-down list box at the top of the Properties window, select the measure Unit Price Discount Pct, and then select Percent in the FormatString list.
In the Properties window, change the Name property for the Unit Price Discount Pct measure to Unit Price Discount Percentage.
In the Measures pane, click Tax Amt and change the name of this measure to Tax Amount.
Modifying the name of a measure in this manner is the same as changing the Name property for the measure in the Properties window.
In the Properties window, click Auto Hide to hide the Properties window, and then click Show Measures Tree on the toolbar of the Cube Structure tab.
On the Build menu of Business Intelligence Development Studio, click Deploy Analysis Service Tutorial.
Because you have configured this project to deploy incrementally, only the changes you have made in this project since the previous deployment are deployed to the instance of Analysis Services.
When deployment has successfully completed, click the Browser tab of Cube Designer.
BI Development Studio detects that the cube has been updated and prompts you to reconnect to show the updated cube.
Click Reconnect on the toolbar of the Browser tab.
The dollar values for each Sales Amount measure are now displayed in the Data pane as currency amounts with the appropriate formatting for your locale.
In the Metadata pane, expand Measures, expand Internet Sales, right-click Order Quantity, and then click Add to Data Area.
Notice that this new measure is formatted to a whole number, as shown in the following image.
On the File menu, click Save All.
This saves the changes you have made to this point in the Analysis Services Tutorial project, so that you can stop the tutorial here if you want and resume it later.
You have successfully improved the user-friendliness of the measures in the Analysis Services Tutorial cube by specifying values for the FormatString and Name properties of each measure.