Power Query allows you to group rows and get the counts of each group very easily.
Group Rows And Get Counts By Power Query
Let’s go through the steps in detail.
Step 1: Select the column in Power Query
To group rows, we first need to select the column from which we want to group the data. In the picture shown below, we are grouping the sales Qtr data i.e. Q1, Q2, Q3, and Q4.
Step 2: Grouping the Rows
To group the rows together we have to go to
Transform tab > Group By option
A group by window gets open after you click on the Group By option. Here you have to specify the column to group by. In this case, we have selected the Qtr column. Also, select the new column name where you get the count of the group by column if you select the Count Rows operation and click OK.
Step 3: Click Close &Apply from the Home tab
Click on the Close & Apply button after you get the desired output as shown below.
You can learn more :
- Steps to Reverse Rows in Power Query
- Learn How to Transpose in Excel
- Learn How to Create Pivot Columns Using Power Query
- Read How to Remove Rows With Errors Using Power Query