October Sale - 20% of all courses - Book Today

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 23577 Reviews
Excellent training course really filled in the gaps for me as a SharePoint administrator -SharePoint Site Owner Brisbane
Kristy - SharePoint Site Owner, .
Great course with very useful content. But also made me realise that Sharepoint is a massive tool with endless capabilities. -SharePoint Site Owner Brisbane
Richard - SharePoint Site Owner, .
Very good -Office365 Beginner Brisbane
Liem - Office365 Beginner, .
Great training - really good pace and so clear - enjoyed this training very much and learnt more than I knew before Thanks -Excel Customised Remote Online
Tricia - Excel Customised, .
Fantastic -Excel Customised Remote Online
Angie - Excel Customised, .
Learnt a lot thank you -Excel Customised Remote Online
Ann - Excel Customised, .
Amazing Trainer very patient and took the time to go through things thoroughly. Thank you Jason -Excel Customised Remote Online
Carly - Excel Customised, .
Very well structured course, easy to understand and follow. Highly recommended !! -Power BI Intermediate Sydney
Josep - Power BI Intermediate, .
Insightful Training. Trainer extremely helpful and took time to sort out any issues on the program. Trainer offered extra tuition if required. Trainer clear and concise in explanation. -Power BI Intermediate Sydney
Aishling - Power BI Intermediate, .
It is a good course. I learned a lot from this. Thank you -Power BI Intermediate Sydney
Eric - Power BI Intermediate, .
Very engaging, enjoyed and learned a lot. -Power BI Intermediate Sydney
Roman - Power BI Intermediate, .
Jagg teach method made the day very informative and interesting. Would have liked some notes to take away on tips and tricks. -Power BI Beginner Adelaide
Allison - Power BI Beginner, .
Very, very good. Extremely knowledgeable, very good communication, loved the hand gestures. -Power BI Beginner Adelaide
Rhett - Power BI Beginner, .
Extremely insightful and very helpful. For someone who has not had a lot of exposure to Power BI, I now feel quite confident with the basics of the program. -Power BI Beginner Adelaide
Ryan - Power BI Beginner, .
Jagg was excellent and have a good sense of humer!!. Learned a lot. Thanks Jagg. -Power BI Beginner Adelaide
Hikkaduwa - Power BI Beginner, .
Great introduction to Power BI, easy to follow along with, lots of good insight and well presented. Instruction was clear and good examples provided. -Power BI Beginner Adelaide
Linda - Power BI Beginner, .
great overview of the building of beginner power BI reports and dashboards. cant wait to build more reports -Power BI Beginner Adelaide
Louise - Power BI Beginner, .
That was very informative and well paced. Thank you -Power BI Beginner Adelaide
Hina - Power BI Beginner, .
Excellent course, Jagg was very informative and clear - thank you -Power BI Beginner Adelaide
Emma - Power BI Beginner, .
very knowledgeable -Office365 Beginner Brisbane
David - Office365 Beginner, .

Trusted by Business

south east asia microsoft training courses nexacu

Follow us