Users Online

· Guests Online: 98

· Members Online: 0

· Total Members: 188
· Newest Member: meenachowdary055

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

Power BI Tutorial - Power BI Transformations

Create Groups in Power BI

Power BI Grouping is the process of combining or merging two or more values for further analysis. For example, When we are seeing products by category report, we may find very few records (unnoticeable products). Sometimes, it may be annoying to see all those underperforming products. In this situation, you can create a Power BI group by combining those records, and display it as one product.

  

In this article, we show you how to create groups in Power BI reports with an example. For this Power BI groups demonstration, we are going to use the SQL Data Source that we created in our previous article.

Please refer Connect to SQL Server article to understand the Power BI Data Source.  

 

Create Groups in Power BI

To visually demonstrate this Power BI grouping technique, we will create a Pie chart. As you can see from the below screenshot, we created a Pie chart by dragging the Sales Amount column to Values field, and Color to Legend region.

NOTE: I suggest you to refer Create a Pie Chart, and Format Pie Chart article to understand the steps involved in creating, and formatting a pie chart.

  Create Groups in Power BI 1

If you observe the below screenshot, Data that we highlighted such as Multi, NA, and Blue color products are not performing well. So, let us group them

Create Groups in Power BI 2

To perform grouping in Power BI, Please select the fields that you want to group, and right-click on it will open the context menu. Please select Group option from the menu.

Create Groups in Power BI 3

Once you Click on the Group option, Power BI will automatically group those items as shown below. That’s it, we did the grouping.

If you observe closely, Legend section is replaced by Color group, and the color is placed in the details section.

TIP: By default, Power BI Group option will group the selected items as one group and remaining options as another group.

Create Groups in Power BI 4

Let me remove the Color field from the Details section. Now you can see only two partitions in the Pie chart: one contains Blue, White and NA colours, and the second partition contains remaining colours.

Create Groups in Power BI 5

Edit Power BI Group

Please select the group that you want to edit, and right-click on it will open the context menu. Select the Edit Groups option form it

Create Groups in Power BI 6

Clicking the Edit Groups option will open the following window.

  • Name: Specify the Group name
  • Field: Field or Column that you used for grouping
  • Group Type: List (group) or bin.
  • Ungrouped values: Fields that are not grouped but available in this column.
  • Groups and Members: List of groups, and their members.
  • Include Other Group: Do you want to place all the ungrouped members in the Other group. If so, checkmark this option.
Create Groups in Power BI 7

Let me uncheck the Include Other group. This will remove others group

Create Groups in Power BI 8

Now you can see the pie chart that is displaying all the colours, and one group that contains Blue, Multi and NA colours. 

 

Create Groups in Power BI 9

Remove Power BI Group Members

To remove Power Bi group members, Please select the group member that you want to remove, and click ungroup button. For the demo purpose, we are removing the Blue colour.

Create Groups in Power BI 10

Now you can see that the Blue colour is removed, and added under the ungrouped values

Create Groups in Power BI 11

And our pie chart is displaying all the colours, and one group that contains Multi and NA colours.

Create Groups in Power BI 12

Rename a Group in Power BI

Double-click on the group that you want to rename, and provide a valid name. Let me rename it as White & Multi & NA

Create Groups in Power BI 13

From the below screenshot, you can see that the group name is renamed.

Add a Member to Groups in Power BI

Please select the group member that you want to add, and select the group as well. Next, click on the Group button.

For the demo purpose, we are adding White colour to an existing group.

Create Groups in Power BI 14

Now you can see the White colour under the group

Create Groups in Power BI 15

Create a New Group in Power BI

Please select the field for which you want to create a group, and click the group button. For the demo purpose, we are selecting the Yellow colour.

Create Groups in Power BI 16

Now you can see the new group.

Create Groups in Power BI 17

Let me add a few more fields to it

Create Groups in Power BI 18

Now you can see, our pie chart has four colours, and they are: Black, Red, and two groups

Create Groups in Power BI 19

Once you created a Group in Power BI, it will act like any other column or fields. So, you can use it in N number of charts.

To demonstrate the same, we created a Column chart that shows the Country wise sales.

Create Groups in Power BI 20

Next, we added the Color group in the legend section.

Create Groups in Power BI 21

The second approach to create Groups in Power BI

Please select the filed that you want to use as a group, and right-click on it will open the context menu. Select the New Group option from the context menu.

Create Groups in Power BI 22

This will open the following window

Create Groups in Power BI 23

Sometimes, Power Bi will open the same window with the different option like we shown in the below screenshot. But, don’t worry, you can change the Group type from Bin to List

Create Groups in Power BI 24

Once you changed that property, you are good to go

Create Groups in Power BI 25

 

Comments

No Comments have been Posted.

Post Comment

Please Login to Post a Comment.

Ratings

Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Render time: 0.79 seconds
10,826,506 unique visits