Locked lesson.
About this lesson
In this module we'll explore how to use Power BI's formula language to create re-usable "Measures"
Exercise files
Download this lesson’s related exercise files.
Basic Measures – Theory.docx66.8 KB Basic Measures – Theory - Solution.docx
66.8 KB
Quick reference
Basic Measures – Theory
An overview of how and why you should create explicit measures.
When to use
When you want to begin writing basic DAX measures for Power Pivot.
Instructions
Advantages of explicitly writing your own formulas in Power Pivot:
- You can provide discoverable names for your measures (instead of “Sum of Sales”)
- You can reuse the measure on multiple PivotTables or PivotCharts
- You can provide default formatting for your measures which will be applied every time you use the measure
The basic measure format:
- Measure Name = FUNCTION(TableName[ColumnName])
Some helpful functions:
- COUNT(Table[Column])
- COUNTA(Table[Column])
- DISTINCTCOUNT(Table[Column])
- COUNTROWS(Table)
- SUM(Table[Column])
- MAX(Table[Column])
- MIN(Table[Column])
- AVERAGE(Table[Column])
Note that this is not an exhaustive list, there are many more
Hints & tips
- Implicit measures are automatically generated when you add a field to the Values area of your Pivot Table
- Explicit measures are measures you define yourself
- The language we use for writing measures is Data Analysis eXpressions (DAX)
Lesson notes are only available for subscribers.