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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.