Sub topic 8
Implicit and explicit measures
This chapter assumes you can move between Report, Table and Model views in Power BI Desktop. It also assumes you know what a measure is and can read basic DAX such as SUM. The chapter covers the two ways a model can aggregate a column and why you should write the aggregation yourself.
Two ways to get a total
Drag Sales[Line Amount] onto a visual and Power BI shows a total. You never wrote a formula, so where did the total come from?
An implicit measure is an aggregation that Power BI creates on the fly when you drop a numeric column on a visual. You pick Sum, Average, Count, Min or Max from the field's dropdown, and the engine builds the DAX behind the scenes. The aggregation lives in that one visual and has no name in the model.
An explicit measure is a measure you write and save in the model. It has a name, a formula and a home table. Any visual, and any other measure, can reuse it.
Total Sales = SUM(Sales[Line Amount])Both give the same number in a simple card. The differences show up when the model grows.
Comparing them
| Aspect | Implicit measure | Explicit measure |
|---|---|---|
| Created by | Dragging a column onto a visual | Writing DAX in a table |
| Reusable in other measures | No | Yes |
| Formula you control | No | Yes |
| Appears in the field list as | A column with a sigma icon | A measure with a calculator icon |
| Number format | Set per visual | Set once, in the model |
Why explicit measures are better
Explicit measures give you these benefits:
- Reuse.
Margin %can refer to[Total Sales]. It cannot refer to a visual's hidden Sum. - Consistency. One definition means every report page shows the same figure. With implicit measures, one author may choose Sum and another Average on the same column.
- Control over context. You can wrap the formula in
CALCULATE, as inRed Sales = CALCULATE([Total Sales], Product[Color] = "Red"). An implicit measure cannot be wrapped this way. - Safer sharing. Some tools that read the model, such as Excel PivotTables connected to the dataset and some report-authoring paths, do not support implicit measures well. An explicit measure works everywhere.
An explicit measure also does not depend on the column's default summarization setting. That setting is easy to change by accident.
Stopping implicit measures from appearing
A numeric column shows up with a sigma icon because its Summarize by property is set to Sum or similar. To turn the behavior off, select the column in Model view and set Summarize by to None. Do this for keys, years and quantities that you never want summed. Then write an explicit measure for the figures you do want to total.
Hiding the underlying column is a common companion step. Once Total Sales exists, hide Sales[Line Amount] so authors reach for the measure.
Where the aggregation is computed
An implicit measure is still a measure. It runs at query time in the current filter context, like any explicit one. The choice is not about speed or storage. It is about control and reuse.
Common errors
- Building a ratio from two implicit sums. Create two explicit measures first, then divide them.
- Leaving Summarize by on for a
Yearcolumn, so a chart shows the sum of years. - Defining the same total twice under different names, one in each report. Keep one in the model.
Exercise
A colleague drops Sales[Unit Price] on a card and picks Sum, then complains that the number is meaningless. Name two changes that stop this from happening again.
Show answer
Set Summarize by to None on Sales[Unit Price], so Power BI no longer offers an automatic Sum. Then write an explicit measure that is meaningful for prices, such as Average Price = AVERAGE(Sales[Unit Price]), and hide the raw column so authors use the measure.