Power BI – Group rows

Group the values from multiple rows in a single value with the Power Query Editor in Power BI. In this lesson, we will get the count by grouping from raw data.

Input File: Store_raw.xlsx
Output Saved as: Amit Grouped Rows.pbix

Click Get data and then Excel Workbook:

Get the data from excel in Power BI

Open your Excel file in Power BI:

Open your Excel file in Power BI

Now, select the workbook and click Transform Data to open the Power Query Editor directly:

Select the Category column and click Group By. This calculates the number of orders for each category:

Group By in Power BI

The dialog box for Group By will open. Check the details here. Here, you can add more groupings but we will keep the default.

You can also add a new column name. The default name for the new column i.e. the resultant column is  Count. The operation is by default Count Rows. You can also change it to Sum, Average, Median, or Count Distinct Rows. We will keep the default:

Set the Operation for Group By in Power BI

Click On and the result is now returned. The new column name is Count:

Count Operation for Group By in Power BI

Now, we have the count of rows i.e. orders based on each category. On the right, in the Query Settings section, the changes are visible i.e. Grouped Rows under the APPLIED STEPS.

Grouped Rows in Power BI

I am saving it as Amit Grouped Rows:

Save the grouped rows in Power BI


If you liked the tutorial, spread the word and share the link and our website Studyopedia with others.


For Videos, Join Our YouTube Channel: Join Now


Read More:

Power BI - What is Data Tranformation
Power BI - Pivot columns
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading