Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Group and aggregate to reduce number of rows/data

Hi,

 

Fairly new to PowerBI, but I've used PowerPivot for quite a while now.

 

Now, I have fairly large datatables when I import them, so I wish to reduce the size/number of rows as much as possible.

 

A nice feature in PowerPivot (that I'm sure exists in PowerBI aswell) was when I connected to an SQL database and found my table, I could select the different columns I wanted, and just click "Group and aggregate" and it applied this to all the selected columns. Then I could take find "hours" and "sales" and apply SUM, and leave things like "Product" and "Product category" unchanged (so as to not make an extra row for the same "product" if the only change was "hours" or "sales", which is now summarized).

 

So, on to PowerBI: If I have a query, with columns like "Product", "City", "Country" (typical name-columns that reoccure through the entire tabel), and "Hours" and "sales". How do I group and aggregate this so it changes from:

 

City Product Sales
Paris Cheese 19
Paris Cheese 21
Paris Ham 5
Berlin Cheese 15
Berlin Cheese 15

 

To this:

City Product Sales
Paris Cheese 40
Paris Ham 5
Berlin Cheese 30

 

I know how to do this in the report, but I'd like to do it in the query editor so I can reduce the number of rows to import.

There's probably a simple solution to this, so I appologize in advance 🙂

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@Anonymous

 

Hi, please follow this video.

 




Lima - Peru

View solution in original post

3 REPLIES 3
OndrejBlaho
New Member

Hello - the video is not available anymore - please can you post sollution again?

Vvelarde
Community Champion
Community Champion

@Anonymous

 

Hi, please follow this video.

 




Lima - Peru
Anonymous
Not applicable

Thanks alot, as suspect an easy solution 🙂

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.