Skip to main content




Power BI buckets or containers are useful for creating a range of data, similar to SQL buckets. Let me show you how to create bins in Power BI with an example

For this Power BI bins demo, we will use the SQL data source that we created in our previous article. Therefore, see Connect to the SQL Server article to understand the data source.

Create containers in Power BI

To visually demonstrate these Power BI bins, we'll create a table. As you can see in the screenshot below, we created a simple table by dragging the Product Key and Sales Amount column.

NOTE: I suggest you refer to the article Create a table and format a table to understand the steps required to create and format a Power BI table.

create-bins-in-power-bi-1-6848475<>create-bins-in-power-bi-1-6848475

Select the file you want to use as a container and right-click on it to open the context menu. Select the New group menu option.

create-bins-in-power-bi-2-4347411

By clicking on the New group The option opens the following window.

  • Name: Specify the name of the Power BI tray
  • Countryside: Field or column you used to group
  • Group type: List (group) or container.
  • Kind of container: There are two options, such as Container size or Number of containers
  • Minimum and maximum value: Minimum and maximum value present in the selected fields. Here is the product key.

If you selected Container Type as Container Size, then you need to specify Container Size (Static Number)

create-bins-in-power-bi-3-7926255

Alternatively, if you selected the Container Type as Number of Containers, you must specify the container count. Here, the container size depends on the container count.

create-bins-in-power-bi-4-4750667

Let me select the container size as 20 and click OK. It means that each cube size is 20

create-bins-in-power-bi-5-1879954

Now you can see the newly created container under the Product table.

create-bins-in-power-bi-6-6965456

Let me add that container to this table. In the following screenshot, you can see that the product key value is 220 for keys between 220 and 240

create-bins-in-power-bi-7-3433349

Edit Power BI containers

Select the container you want to edit and right-click on it to open the context menu. Select the Edit groups choice of her

create-bins-in-power-bi-8-8391078

By clicking on the Edit groups The option opens the following window. Use this window to change according to your needs.

create-bins-in-power-bi-9-7383334

Delete containers in Power BI

Select the container you want to delete and right-click on it to open the context menu. Select the Remove option to do it

create-bins-in-power-bi-10-9962164

Click on the Remove to confirm the delete operation.

create-bins-in-power-bi-11-9774450

Create containers in Power BI example 2

To demonstrate the containers, we created a column chart showing the colored sales. This time we create a bin in Sales Amount

create-bins-in-power-bi-12-3396035

Right-click on the Sales Amount and select the New Group option from the context menu. As you can see in the following screenshot, we define the Power BI tray size as 357.2655

create-bins-in-power-bi-13-9957413

Let me add this new Sales Amount tray to the legend section of the column chart.

create-bins-in-power-bi-14-4162784

Let me edit the Power BI tray and change the tray type to Number of trays and the tray count to 3

create-bins-in-power-bi-15-3037159

Now you can see, each bar in the column chart divided by a 3 count container.

create-bins-in-power-bi-16-1243597




Power BI buckets or containers are useful for creating a range of data, similar to SQL buckets. Let me show you how to create bins in Power BI with an example

For this Power BI bins demo, we will use the SQL data source that we created in our previous article. Therefore, see Connect to the SQL Server article to understand the data source.

Create containers in Power BI

To visually demonstrate these Power BI bins, we'll create a table. As you can see in the screenshot below, we created a simple table by dragging the Product Key and Sales Amount column.

NOTE: I suggest you refer to the article Create a table and format a table to understand the steps required to create and format a Power BI table.

create-bins-in-power-bi-1-6848475<>create-bins-in-power-bi-1-6848475

Select the file you want to use as a container and right-click on it to open the context menu. Select the New group menu option.

create-bins-in-power-bi-2-4347411

By clicking on the New group The option opens the following window.

  • Name: Specify the name of the Power BI tray
  • Countryside: Field or column you used to group
  • Group type: List (group) or container.
  • Kind of container: There are two options, such as Container size or Number of containers
  • Minimum and maximum value: Minimum and maximum value present in the selected fields. Here is the product key.

If you selected Container Type as Container Size, then you need to specify Container Size (Static Number)

create-bins-in-power-bi-3-7926255

Alternatively, if you selected the Container Type as Number of Containers, you must specify the container count. Here, the container size depends on the container count.

create-bins-in-power-bi-4-4750667

Let me select the container size as 20 and click OK. It means that each cube size is 20

create-bins-in-power-bi-5-1879954

Now you can see the newly created container under the Product table.

create-bins-in-power-bi-6-6965456

Let me add that container to this table. In the following screenshot, you can see that the product key value is 220 for keys between 220 and 240

create-bins-in-power-bi-7-3433349

Edit Power BI containers

Select the container you want to edit and right-click on it to open the context menu. Select the Edit groups choice of her

create-bins-in-power-bi-8-8391078

By clicking on the Edit groups The option opens the following window. Use this window to change according to your needs.

create-bins-in-power-bi-9-7383334

Delete containers in Power BI

Select the container you want to delete and right-click on it to open the context menu. Select the Remove option to do it

create-bins-in-power-bi-10-9962164

Click on the Remove to confirm the delete operation.

create-bins-in-power-bi-11-9774450

Create containers in Power BI example 2

To demonstrate the containers, we created a column chart showing the colored sales. This time we create a bin in Sales Amount

create-bins-in-power-bi-12-3750023

Right-click on the Sales Amount and select the New Group option from the context menu. As you can see in the following screenshot, we define the Power BI tray size as 357.2655

create-bins-in-power-bi-13-9957413

Let me add this new Sales Amount tray to the legend section of the column chart.

create-bins-in-power-bi-14-2976970

Let me edit the Power BI tray and change the tray type to Number of trays and the tray count to 3

create-bins-in-power-bi-15-2996118

Now you can see, each bar in the column chart divided by a 3 count container.

create-bins-in-power-bi-16-9566184