![]() ![]() For example, if a user removes the Continent attribute from the columns and replaces it with the Year attribute, then the custom formatting rule stops working or could return unexpected results.Īs you can see, simple measures like MinMax can make a significant difference in the usability of a report. For example, you can highlight the presence of large transactions in the underlying data even though the report only shows aggregated values, or you can highlight a difference with a reference value that goes beyond a predefined threshold.īecause the measure must internally rebuild the exact values shown in the matrix, the measure used for the conditional formatting strongly depends on the matrix where it is being used. In other reports, you can use the same approach to highlight cells based on different business rules. We used this technique to highlight the minimum and maximum values in the matrix. We configure the conditional formatting of the matrix so that it uses the information provided by the MinMax measure to color the cell background with the following rule.īy using this configuration, we obtain the desired result. The MinMax measure returns 1 only for the cell with the minimum value, 2 for the cell with the maximum value, and blank otherwise. The MinMax measure must return a number because otherwise, it cannot be used in the conditional formatting panel. Finally, it checks if the current value of the measure is the minimum, the maximum, or any other value: It then identifies the minimum and maximum values among all the ones computed. We need a MinMax measure that rebuilds the full result of the matrix in a temporary table. As we discuss later, we can use the same technique to highlight cells with an arbitrary business rule. We can obtain this result by mixing conditional formatting of the background with a measure that returns a number indicating whether the current cell is the minimum or the maximum of all the cells in the matrix. The following picture shows a matrix that highlights the best/worst cases. In other words, we want to highlight the cell with the maximum value – the best combination of continent and brand in the previous picture – and the minimum value – the worst combination of brand and continent. However, there are cases where we want to identify the best and worst figures in a matrix full of numbers. The conditional feature in Power BI can improve data visualization, highlighting the higher and lower values with different background colors. The matrix itself is not highlighting the most relevant information, nor guiding our eyes where it matters. If we were to search for specific kinds of information by just looking at the numbers, we would be on our own. If we look for geographical areas where some brands do not sell well, we can start the investigation with a matrix like the one below. We look at the sales of Contoso in different countries and years. In this example, we show how to highlight relevant information in a matrix by formatting the desired cells. Conditional formatting is a handy feature in Power BI combined with DAX skills, conditional formatting can produce excellent results.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |