-
Book Overview & Buying
-
Table Of Contents
Tabular Modeling with SQL Server 2016 Analysis Services Cookbook
By :
Now that there are more tables in the model, we are going to add an additional measure to perform quick calculations on data. The measure will use a simple DAX calculation since this recipe is focused on how to add or modify the model measures. The future chapters will focus on more advanced DAX calculations.
Open the Chapter 3_Model project in the Model.bim folder and make sure you are in Grid view.
Select the cell under Count_of_Crashes and in the fx bar add the following DAX formula to create Sum_of_Fatalities:
Sum_of_Fatalities:=SUM(Crash_Data[FATALITIES])
Then, hit Enter to create the calculation:

In the Properties window, enter Injury_Calculations in the Display Folder. Then, change the Format to Whole Number and change the Show Thousand Separator to True. Finally, add it to Description Total Number of Fatalities Recorded:

In this recipe, we added a new measure to the existing model that calculates the total number of fatalities...