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
JavaJiveSeattle
New Member

How to aggregate

 

Hi PBI Experts,

 

I'm new to PowerBI so appreciate anyone's assistance here. How do I aggregate some selected rows below. E.g. I want to group together Australia, Canada and LATAM into a "Other" summing up its sales revenue since they are not relevant but I don't want to mess up the total at the bottom of the table? I want to preserve the other rows. I'm not sure how this will work with the % values like 'Growth %' and Index %. 

 

But would appreciate guidance on grouping some of the countries below. Thanks!

Capture.JPG

1 ACCEPTED SOLUTION

Ok, try this Smiley Happy

1. In the Menu bar press Modeling

2. Click New Column

3. Paste the code I wrote before, but change the name for the table and if you want to change the name of the column "Region2"

4. Press Enter

5. Select your table and drag and drop the new Region2 to the table

View solution in original post

3 REPLIES 3
Johanno
Responsive Resident
Responsive Resident

Hi, you could do the grouping by creating a calculated column like:

Region2 = SWITCH(Table1[Region];"Australia";"Other";"Canada";"Other";"Latam";"Other";Table1[Region])

Then you add this column to the table instead of the old one. I guess your percentage would still be right, if not add another screen shot.

Folks, I'm super new to PowerBI. Now even sure how to implement these instructions. I appreciate it though but could someone provide some steps to make this work. Thanks!

Ok, try this Smiley Happy

1. In the Menu bar press Modeling

2. Click New Column

3. Paste the code I wrote before, but change the name for the table and if you want to change the name of the column "Region2"

4. Press Enter

5. Select your table and drag and drop the new Region2 to the table

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.