Power BI Blog: Text Data Groups
5 November 2020
Welcome back to this week’s edition of the Power BI blog series. This week, Jonathan Liau explores using the Data Groups functionality in Power BI.
Let’s jump straight into this week’s example. Let’s say we have created the following table in Power BI:
It’s nice to have the sales amounts broken down by different product types and the country. However, what if we want to create a field that further summarises the data? For example, if we look at the data, we can see that there are three types of bikes: Touring Bikes, Mountain Bikes, and Road Bikes. These can clearly be grouped up at another level. Another example would be: Shorts, Socks, Vests, Gloves, and Caps: these items may be grouped together as Clothing. We can do this easily with the Grouping functionality in Power BI.
To create a group, navigate to the Fields panel in Power BI, and locate the field you wish to group. In this case we are after the ‘Category Name’ field.
Right click on the field then select the ‘New Group’ option.
The Groups dialog box will appear, allowing us to assign ‘Ungrouped values’ into groups.
Select the ‘Ungrouped values’ in the left window, and then click on the ‘Group’ button to create a new group.
If we are unhappy with the default name of the group, we can rename it by double clicking on the group name and editing it there.
If there are items that do not fall into a particular group, we can select the ‘Include Other group’ option that will group the remaining items into an ‘Other’ group.
Do not forget to give the group a name; this will be the name of the grouped field in our dataset.
Otherwise, when we are finished grouping our data, we can click on the OK option. We can then include the new grouped field in our matrix visualisation.
The visualisation will update to reflect the new groupings.
That’s it for this week! Come back next week for more on Power BI!