Understanding DAX formulas
There are two basic types of DAX formulas. The most common one that you will use performs a function on the data to return a value. The other returns data as a table most commonly used to create a new dataset or is used as input for another function. To create any DAX formula, you need to understand the basic syntax. This recipe explains how the Count_of_Crashes formula works and creates the formula using Power Pivot in Excel.
Getting ready
This recipe will use the Chapter 9 Power Pivot.xlsx workbook available from the Packt Publishing website.
How to do it...
Open the Chapter 9 Power Pivot.xlsx workbook and click on the Power Pivot menu.
Then select the Measures tab and New Measure.
The Measure window will open.
Enter Count_of_Crashes in the Measure Name, and in the Formula area enterÂ
=COUNT([CASENUMBER])
Finally, change the Category to Number, Format to Whole Number, and check the Use 1000 seperator (,),and hit OK to close the window.
How it works...
In this...