Database Reference
In-Depth Information
Creating calculations
A key capability of the tabular mode is the ability to easily create calculations; these
calculations could either be created as measures or KPIs that will be evaluated and
calculated at the query time, or they can be created as columns that will be created
during processing and stored as part of the model. In this section we will go through
how to create calculations of different kinds when working with tabular models.
Adding calculated columns to the tabular model
The simplest calculation that you can create is a calculated column . A calculated
column could either reference columns in the same table or other columns in other
tables. To create a simple calculated column, perform the following steps:
1. Switch to the Grid view by clicking on the button in the lower right-hand corner
in the tabular model designer.
2. Click on the FactInternetSales table.
3. Scroll to the right-hand side of the table and click on the top cell in the column
under Add Column , as shown in the following screenshot:
4. Click on the formula bar and type in the following formula:
=[SalesAmount]-[TotalProductCost]
5. Right-click on the newly created column and select Rename Column .
6. Change the name to Margin .
Search WWH ::




Custom Search