To prepare for this recipe, perform the following steps:
- Open Power BI Desktop.
- Use an Enter Data query to create a table called R07_Table with the following data:
Item |
Category1 |
Category2 |
Value |
Item 1 |
Blue |
Green |
100 |
Item 2 |
Blue |
Green |
200 |
Item 3 |
Green |
Blue |
300 |
Item 4 |
Green |
Blue |
400 |
Item 5 |
Red |
Green |
500 |
Item 6 |
Red |
Green |
600 |
Item 7 |
Red |
Blue |
700 |
Item 8 |
Red |
Blue |
800 |
- Create a Matrix visualization and, using the R07_Table table, place the Category1 column in the Rows area of the visual, the Category2 column in the Columns area of the visual, and the Value column in the Values area for the visualization.
- Right-click the Value column and choose Show value as and then Percent of Grand Total.
- Create a second Matrix visualization and, using the R07_Table table, place the Category1 column in the Rows area of the visual, the Category2 column in the Columns area of the visual, and the Value column in the Values area for the visualization.
- Right-click the Value column and choose Show value as and then Percent of Column Total.
- Create a third Matrix visualization and, using the R07_Table table, place the Category1 column in the Rows area of the visual, the Category2 column in the Columns area of the visual, and the Value column in the Values area for the visualization.
- Right-click the Value column and choose Show value as and then Percent of Row Total.
We will use these matrix visualizations to check our math!