New feature as of August 2019.
This is additional content for the book, “Data Analysis with Microsoft Power BI.” It fits at the end of Chapter 6 – Basic Data Visualization.
Grouping Visuals
There are times when we want to work with several visualizations together. You may want to be able to move them around the screen as a grouping, maintaining their relative position to one another. You may want to resize them all at once.
Power BI enables us to create groups of objects on our report pages. In addition to moving and sizing these groups, we can also give all of the items in the group a common background color. We can also hide the entire group or make it visible all at once. Object visibility is covered in Chapter 8.
The grouping capability is only available in Power BI files using the modern visual header. Power BI reports originally created with an older version of Power BI Desktop may not have modern visual header turned on.
Turning On the Modern Visual Header
- If it is not currently open, locate the “Max Min Sales Information.pbix” file, and then double-click it to open it in Power BI Desktop.
- Select File | Options and settings | Options. The Options dialog box will appear.
- Select the “Report settings” page in the CURRENT FILE section of the dialog box.
- Check “Use the modern visual header with updated style options.”
- Click OK.
Creating Groups of Visuals
- Select the Sales Person Detail report page.
- Click the title area of the “Sales in Units by Promotion” treemap to select it.
- Hold down CTRL and click the title area of the “Sales in Units by Sales Region” treemap. These two treemaps should now be selected.
- Right-click the title area of the “Sale in Units by Sales Region” treemap and select Group |Group from the context menu. The two treemaps are now in a group.
Working with Visual Groups
- Click and drag one of the two visualizations to a new position on the report. All visuals in the group move together.
- Press CTRL Z to undo the move and put the visualizations back in their original location.
- Use the slider switch next to Background to turn on the background color option for this group.
- Expand the Background area.
- Use the color picker to select a medium blue background color for the group. The report will appear as shown here:
Ungrouping Visuals
- Right-click one of the two visualizations in the group and select Group | Ungroup from the context menu. The visualizations are ungrouped and the background color disappears.
Creating and Working with Visual Groups in the Selection Pane
In addition to creating and managing visual groups by interacting with the visualizations, we can work with groups using the Selection pane.
- Select the View tab of the ribbon.
- Check Selection pane. The Selection Pane appears.
- in the Selection pane, click the Shape entry near the top of the list.
- In the Selection pane, hold down CTRL and select Image.
- In the Selection pane, hold down CTRL and select Card box.
- Click the ellipsis button (…) next to one of the three selected items in the Selection pane.
- Select Group | Group from the popup menu. An entry called “Group 1” appears in the Selection pane.
- Double-click the “Group 1” entry in the Selection pane.
- Replace “Group 1” with Sales Person Header and press ENTER.
- Expand “Sales Person Header” in the Selection pane.
- Click and drag Text box into the group as shown:
The text box is added to the Sales Person Header group. - Click and drag Card out of the group as shown here:
The card is removed from the group. - in the Selection pane, click the Shape entry near the bottom of the list.
- In the Selection pane, hold down CTRL and select Card box.
- Click the ellipsis button (…) next to one of the two selected items in the Selection pane.
- Select Group | Group from the popup menu. An entry called “Group 1” appears in the Selection pane.
- Double-click the “Group 1” entry in the Selection pane.
- Replace “Group 1” with Sales Person Name and press ENTER.
- In the Selection pane, select the Sales Person Header group.
- In the Selection pane, hold down CTRL and select the Sales Person Name group. Both the Sales Person Header and Sales Person Name groups should be selected.
- Click the ellipsis button (…) next to one of the two selected groups in the Selection pane.
- Select Group | Merge from the popup menu. The two groups are merged into the Sales Person Header group.
- Expand the Sales Person Header group to view the elements in the group.
- Click the “Hide this visual” icon next to the Sales Person Header group to hide all of the visualization items in the group as shown here:
All of the items in the group disappear from the report page. - Click the “Hide this visual” icon next to the Sales Person Header group again to unhide all of the visualization items. The items in the group reappear on the report page.
- Click Save.