All courses available in-class or via remote login

Group By in Power Query

Using Group By in Power Query

September 19, 2017

Using Group By in Power Query

Group By is an excellent feature in Power Query to group related rows by a column. This is useful when you have multiple entries for related rows and you want to combine them into one row based on a common attribute value. This example will illustrate this in detail

Consider a query with sales orders for employees across different states and dates.

Rows 2 and 3 has the sales orders for Bob in WA on 9/08/2016. There might be further such rows in the query where related rows might have multiple Orders. We want to combine the data such that there is only one row for each combination of Employee, State, and Date and an Orders column which sums up the orders for related rows.

Click on the Date column and go to Transform and select Group By to bring up the Group By window. Select the Advanced option at the top and fill out the sections like below and hit OK.

Group By

 

The Query now looks like this. Bob’s orders on 09/08/2016 in WA has now been summed to 62 in the Number of Orders columns and since there were two orders for Bob, the Count Orders column reflects that.

Power Query count

 
 

Check out our Power BI courses here.

 

 

Contact Us

What is Remote Training?

Valued by Individuals

4.8/5
Over 25938 Reviews
Being custom arranged for what is used in this workplace was a large benefit and Steven use the Nexacu examples but made sure he referred to how it related to QR examples. -Excel Customised Brisbane
Phoebe - Excel Customised, .
Course was use full. Step by step analysis of formulas and executing them was very much usefull. -Excel Customised Brisbane
Karan - Excel Customised, .
Good course -Excel Customised Brisbane
Mark - Excel Customised, .
Well constructed 1 day course. I felt it was at a good pace, worth while in certain items and excellent presentation. Steven did not go too far without ensuring everyone was up to date! Time to get some practice! -Excel Customised Brisbane
Colin - Excel Customised, .
Good and efficient training. -Excel Customised Brisbane
Sabine - Excel Customised, .
Very well run course -Excel Customised Brisbane
Sam - Excel Customised, .
A very informative course. -Excel Customised Brisbane
Andrew - Excel Customised, .
Steven was great, thank you -Excel Customised Brisbane
Tahlia - Excel Customised, .
Very useful -Excel Customised Brisbane
Nadia - Excel Customised, .
Great Session,Steven was very knowledgeable, kept us on track, willing to answer questions and very engaging. Thank you Steven. -Excel Customised Brisbane
Caralee - Excel Customised, .
Well presented and informative -Office365 Advanced Adelaide
Annie - Office365 Advanced, .
The instructor (Michael) is very good in explanation and has a good example to make everything clear and easy to understand. -SharePoint Site Owner Sydney
Nawaporn - SharePoint Site Owner, .
This has been a thorough learning experience covering all aspects SharePoint. The training was delivered professionally and was easy to understand. -SharePoint Site Owner Sydney
David - SharePoint Site Owner, .
Course was well run. -Office365 Advanced Adelaide
Stacey - Office365 Advanced, .
Great! Very easy to follow and informative -Power BI Beginner Melbourne
Connie - Power BI Beginner, .
Progressed at a good pace but Ken was happy to go back over something if required. Came away with a good foundation to start working with data. -Power BI Beginner Melbourne
James - Power BI Beginner, .
Thank you -Power BI Beginner Melbourne
Phill - Power BI Beginner, .
A Good Start for Power BI -Power BI Beginner Melbourne
Peter - Power BI Beginner, .
very well presented. great pace, easy to understand and keep up -Power BI Beginner Melbourne
Wendy - Power BI Beginner, .
Great session for learning how to navigate p/bi at the foundation level. -Power BI Beginner Melbourne
catherine - Power BI Beginner, .

Trusted by Business

Procured by Government

Awards and Accreditations

Map of Australia

Follow us