Power Pivot Principles: Tables, Fields and Measures
3 April 2018
Welcome back to our Power Pivot blog series, today let’s go over the syntax between a table, a field, and a measure.
Before we go into Data Analytics EXpressions (DAX), we first have to learn how to refer to a Table, a Field and a Measure in DAX.
Imagine that we have a table such as the following:
- If the table above is called ‘Sales’ we would refer to it as ‘Sales’ in DAX
- If we want to refer to any of the fields in this table, ‘Sales ID’ or ‘Sales Amount’, we would have to write it as ‘Sales[Sales ID]’, or ‘Sales[Sales Amount]’
- If we create a measure (i.e. a formula which manipulates the aggregated summaries of one or more fields or other calculations) to calculate tax and call it ‘Sales Tax’, we will refer to it as [SalesTax] with square brackets around it. The reference to a table is not required (and would be confusing) as calculations based upon fields are portable (i.e. they may be transferred from one table to another).
This may be summarised as follows: