3E. Add measures to Power BI Desktop models Flashcards
What’s the difference between implicit and explicit measures?
Measures in Microsoft Power BI models are either implicit or explicit. Implicit measures are automatic behaviors that allow visuals to summarize model column data. Explicit measures, also known simply as measures, are calculations that you can add to your model. This module focuses on how you can use implicit measures.
What does the sigma symbol signify next to a column in the Fields pane, and how can you control whether a column has this symbol?
- It’s a numeric column.
- It will summarize column values when it is used in a visual (when added to a field well that supports summarization).
As a data modeler, you can control if and how the column summarizes by setting the Summarization property to Don’t summarize or to a specific aggregation function. When you set the Summarization property to Don’t summarize, the sigma symbol will no longer show next to the column in the Fields pane.
The sigma symbol does not show next to non-numeric columns in the Fields pane because they don’t summarize by default.
Which aggregation functions are supported by numeric columns?
Sum
Average
Minimum
Maximum
Count (Distinct)
Count
Standard deviation
Variance
Median
Which aggregation functions are supported by non-numeric columns?
Text columns allow the following aggregations:
First (alphabetically) Last (alphabetically) Count (Distinct) Count
Date columns allow the following aggregations:
Earliest Latest Count (Distinct) Count
Boolean columns allow the following aggregations:
Count (Distinct) Count
What are some benefits of relying on implicit measures?
Implicit measures are simple concepts to learn and use, and they provide flexibility in the way that report authors visualize model data.
Additionally, they mean less work for you as a data modeler because you don’t have to create explicit calculations.
What are some limitations of implicit measures?
- Despite setting an appropriate summarization method, report authors could choose to aggregate a column in unsuitable ways. For example, in the matrix visual, you could modify the aggregate function of Unit Price to Sum. The report visual obeys your setup, but it has now produced a Sum of Unit Price column, which presents misleading data.
- The most significant limitation of implicit measures is that they only work for simple scenarios, meaning that they can only summarize column values that use a specific aggregation function. Therefore, in situations when you need to calculate the ratio of each month’s sales amount over the yearly sales amount, you’ll need to produce an explicit measure by writing a Data Analysis Expressions (DAX) formula to achieve that more sophisticated requirement.
- Implicit measures don’t work when the model is queried by using Multidimensional Expressions (MDX). This language expects explicit measures and can’t summarize column data. It’s used when a Power BI semantic model is queried by using Analyze in Excel or when a Power BI paginated report uses a query that is generated by the MDX graphical query designer.
Which query language is incompatible with implicit measures?
Implicit measures don’t work when the model is queried by using Multidimensional Expressions (MDX). This language expects explicit measures and can’t summarize column data. It’s used when a Power BI semantic model is queried by using Analyze in Excel or when a Power BI paginated report uses a query that is generated by the MDX graphical query designer.
How are measures stored?
Measures don’t store values in the model. Instead, they’re used at query time to return summarizations of model data.
Can measures reference tables or columns directly?
No. measures can’t reference a table or column directly; they must pass the table or column into a function to produce a summarization.
What is a “simple” measure, and how do they compare to implicit measures?
A simple measure is one that aggregates the values of a single column (or a single table); it does what implicit measures do automatically.
What is a good step to take immediately after creating a measure?
Immediately after you create a measure, set the formatting options to ensure well-presented and consistent values in all report visuals.
What is a benefit of using only explicit measures and hiding implicit measures from the view of report authors?
It results in report authors losing their ability to summarize the column except by using your measures, meaning they cannot accidentally summarize columns in illogical ways.
Describe the COUNT function.
The COUNT DAX function counts the number of non-BLANK values in a column,
Describe the DISTINCTCOUNT function.
The DISTINCTCOUNT DAX function counts the number of distinct values in a column.
What is a sometimes semantically clearer alternative to COUNT?
Instead of counting values in a column, it’s semantically clearer to use the COUNTROWS DAX function. Unlike the previously introduced aggregation functions, which aggregate column values, the COUNTROWS function counts the number of rows for a table.