From the course: Excel: Power Query (Get & Transform)

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Group By feature

Group By feature

Let's talk about grouping in Power Query. It's really, really handy. First, our data, we have stores; Amaranth Plaza, Red Rock Mall, Lewis Avenue. We can see Andreas is a full-time employee who worked 46 hours at Red Rock Mall. Look down further. Cynthia worked two different stores. She's part-time. She worked at Amaranth Plaza and Red Rock Mall. Twelve hours at Amaranth, ten at Red Rock. And Denise worked in all three stores and Denise is full-time. So we are going to group this data a couple of ways. My cursor is in a data set. Right-click, GetData from Table/Range. First, let's group by the people and get a sum of the hours worked. We don't care about the store or the statuses. We just want to see what is Denise's total across the three stores. And anybody else, we just want their totals. I'm going to go to Group by, still a basic group by, the name and then get a sum of which column? Hours worked. Total hours. Okay. Now, we see Denise worked a total of 40 hours. I'm going to name…

Contents