In this Microsoft Power BI Tutorial, We will discuss how to create a Power BI Query Group, What are the different ways to create Power BI Query Group, how to add a Table to Query Group in Power BI.
Also, We will discuss how to rearrange Tables in a Power BI Query Groups, How we can delete a Query Group in Power BI and Nested Query Groups in Power BI.
Also, We will see what is the Power BI Group By and I will show you how we can use it with a simple example.
Learn how to export power bi report to excel and how to export power bi reports to pdf.
SharePoint Online tutorial contents:
Create a Query Group in Power BI
First of all, To create a Query Group on existing tables in Power BI, you have to enter in the Edit Queries option. So, click on the Edit Queries option which is present under the Home tab as shown below.
Once you will click on the Edit Queries option, a window will appear which is known as Power Query Editor. You can view all the Tables that are present under the Queries section as like the below screenshot.
Different ways to create Power BI Query Group
There are two different ways to create the Query Group in Power BI which you can see in the below points as:
Approach-1
The first approach to create a new Power BI Query Group, just right-click on the blank space under the Queries section. Select the New Group option from the menu as shown below.
When you will select the New Group option from the menu, it will open the following window where you have to enter the following required fields as:
- Name: Enter the name of the new group.
- Description: Provide a description of the new group.
Once you have specified all the value, just click on OK.
As per my requirement, I have specified my new group name as TSInfo Team and clicked on OK.
Now you can see the new group is created as TSInfo Team as a folder like the below screenshot.
Approach-2
The second approach to create a new Power BI Query Group, just right-click on the table where you want to create a new Group. Select the Move To Group option and then click on New Group as the below screenshot.
When you will click on New Group, the same window will appear where you have to specify the Group Name and Description.
Add a Table to Query Group in Power BI
In Power BI, If you want to add a table to Query Group, then right-click on the table which you want to add. Select Move To Group and then click on the Group name (as in this example, I have taken TSInfo Team).
Now you can view the Employee Details table is present under the TSInfo Team group as shown below.
Rearrange Tables in a Power BI Query Groups
Suppose you want to view all table names as an ascending or descending order, then, in this case, you can rearrange your all table names by using Move Up and Move Down option.
Let’s take an example. In this below example, I want to move up the table named Sales Revenue. For this, I have right-clicked on the table and selected Move Up option as you can see from the below screenshot.
Now you can see the table Sales Revenue is moved up above the Sales Details table as shown below.
Delete a Query Group in Power BI
Suppose you want to delete a query group that is unwanted or unuseful. For that, Right-click on the Query group name and choose Delete Group option from the drop-down.
When you will click on the Delete Group option, it will open the following window. If you are sure to delete the Power BI Query Group, then click on the Delete button as shown below.
Ungroup existing Query Group in Power BI
If you want to ungroup the existing Query Group, then right-click on the Query group name and select the Ungroup option.
Once you will ungroup the existing group, you can not see that group anymore as you can not see in the below screenshot.
Nested Query Groups in Power BI
Suppose you want to add a query group inside the other query group, then you can follow the below processes:
- Right-click on your Power BI Query Group.
- Select the Move To Group option.
- Select your Group name where you want to add the group.
As per my requirement, I wanted to add the TSInfo Training Group in the TSInfo Team group.
Now in the below screenshot, you can see the TSInfo Training Group is present inside the TSInfo Team group.
Again if you want to undo the group as it is previous, then right-click on that group name and select Move To Top Level option.
Once all things will be over, don’t forget to click on the Close and Apply button which is present under the Home tab as shown below. Because until and unless you will not click on this button, then the changes will not affect in Power BI.
Group By in Power BI
The Group By option helps to group the values in multiple rows into a single value in the Query Editor. You can group by values like total revenues, count of employees, count of products, etc.
To create Group By in Power BI, there are two different approaches are present as:
- By using the Home tab:
The first approach to create Group By in Power BI, Go to the Home tab and then click on Group By option which is present in the ribbon section as shown below.
- By using the Transform tab:
The second approach to create Group By in Power BI, Go to the Transform tab (inside the Edit queries button in Power BI Desktop) and then click on Group By option which is present in the ribbon section as shown below.
Once you will click on Group By option, it will open the following window where you have to enter some required values as:
- Group by: Choose any column which you want to be grouped. By default, the Query Editor selected any one column, but you can change it to be any column from the drop-down.
- New column name: Specify the name of the new column which will display in the Power BI query editor.
- Operation: Provide some query operations like sum, Count rows, etc, as per your requirement.
- Add grouping: When you will select the Advanced option, then only you can view this option. By using this option, you can perform the Group by actions on multiple columns.
- Add aggregation: When you will select the Advanced option, then only you can view this option. By using this option, Query Editor creates a new column (based on your selections in this window) that operates on multiple columns.
Once you will enter all the field values, Just click on OK as the below screenshot.
Now in the below screen, you can see the Group By value is displaying in another new column as Count.
Also, you may like the below Power BI articles:
- Power BI Visualizations
- Power BI Custom Visuals
- Add Title, Image, and Video to Power BI Dashboard
- Create a Power BI Dashboard and Add Reports to Power BI Dashboard
- PowerBI Report Filter using Slicer Visualization
- Power BI: Create a various report from SharePoint Online list
- Access to the resource is forbidden error in Power BI
- Create a Power BI report from Excel using Power BI Desktop
- Add Web Content to Power BI Dashboard
- [Video Tutorial] Create Power BI Dashboard step by step tutorial
- Microsoft Power BI Error: This content isn’t available
- Power BI On-premises Data Gateway
- Power BI Change Data Type of a Column
Hence in this Microsoft Power BI Tutorial, We discussed how to create a Power BI Query Group, What are the different ways to create Power BI Query Group, how to add a Table to Query Group in Power BI.
Also, We discussed how to rearrange Tables in a Power BI Query Groups, How we can delete a Query Group in Power BI and Nested Query Groups in Power BI.
Also, We will saw what is the Power BI Group By and I have shown you how we can use the Power BI Group By option by taking a simple example.
Hello Everyone!! I am Bhawana a SharePoint MVP and having about 10+ years of SharePoint experience as well as in .Net technologies. I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools. Now exploring more in SharePoint 2016 🙂 Hope here I can contribute and share my knowledge to the fullest. As I believe “There is no wealth like knowledge and no poverty like ignorance”