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 24317 Reviews
It was very educational. Steven explained all very clear. I definitely will use it in my work. cheers -Excel Advanced Brisbane
Olga - Excel Advanced, .
Found a number of things that I will be able to take back to the office and use. Steven presented and kept things flowing well. -Excel Advanced Brisbane
Amanda - Excel Advanced, .
The session was delivered in efficient way. Gained so many knowledge, new way of creating report based on data available. -Excel Advanced Brisbane
Ratih - Excel Advanced, .
Steven is a great tutor -Excel Advanced Brisbane
Donna - Excel Advanced, .
Great session. Very helpful. -Excel Advanced Brisbane
Jacinta - Excel Advanced, .
Steven was very patient, very knowledgeable and I learnt a lot while having a great time. Thanks heaps :) -Excel Advanced Brisbane
Chris - Excel Advanced, .
great course thank you -Excel Advanced Brisbane
Jodi - Excel Advanced, .
Good Course -Power BI Advanced Brisbane
Sunmeen - Power BI Advanced, .
Well done, knowledgeable presenter -Excel Advanced Brisbane
Chester - Excel Advanced, .
Great pace and content, trainer explained everything very well. -Power BI Advanced Brisbane
Ana - Power BI Advanced, .
Another very informative day with a full morning on DAX, a good look at dynamic row level security and other useful tools. A lot of information, but very helpful! -Power BI Advanced Brisbane
Karen - Power BI Advanced, .
It went a bit fast for topics that were new to me. For topics that I had a good understanding the pace was fine. -Power BI Advanced Brisbane
Robin - Power BI Advanced, .
Very informative, learnt a lot in one day! -Power BI Advanced Brisbane
Ashlee - Power BI Advanced, .
very good session -Power BI Advanced Brisbane
Lucy - Power BI Advanced, .
great session, very informative Jason is a great teacher! -Power BI Advanced Brisbane
Peter - Power BI Advanced, .
valuable session and definitely learnt some new things around our reporting presentations moving forward but also around our animations. Loved how interactive it was and that it is hands on being able to do the live training. -PowerPoint Level 2 Brisbane
Charmaine - PowerPoint Level 2, .
Stuart was a fantastic presenter. He really engaged everyone. I learnt a lot of great tips and tricks and can see them being used on a regular basis. Certainly some "ah ha!" moments too. Run really well and highly recommend Stuart as a presenter. -PowerPoint Level 2 Brisbane
Katrina - PowerPoint Level 2, .
Good presentation. Kept the day interesting and lots of learnings even though this is not my first powerpoint training session. Learnt some great useful skills I'm looking forward to trying out soon! -PowerPoint Level 2 Brisbane
Celia - PowerPoint Level 2, .
Stuart was very personable and an engaging presenter. -PowerPoint Level 2 Brisbane
John - PowerPoint Level 2, .
thank you Stuart, enjoyed the course very much, had a lot of take away. -PowerPoint Level 2 Brisbane
Susanna - PowerPoint Level 2, .

Trusted by Business

Procured by Government

Awards and Accreditations

Map of Australia

Follow us