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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Grouping/summing rows

Hi, I hope someone can help: I have a simple table like this:

table.jpg

 

I need to make another table which groups/sums these rows together into new names (new1=A+B, new2=C, new3=D+E+F), like this:
table2.jpg
I tried the 'Group' function but I couldn't make it work.

How can this be done?

Thank you very much

1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous 

You may add a column with IF Function.Then drag them to table visual to get the table.

Column = 
IF (
    Table1[categories] IN { "A", "B" },
    "new1",
    IF ( Table1[categories] IN { "D", "E", "F" }, "new3", "new2" )
)

1.png

Or create the table with SUMMARIZE Function.

Table = SUMMARIZE(Table1,Table1[Column],"Open",SUM(Table1[Open]),"Engaged",SUM(Table1[Engaged]),"Highly",SUM(Table1[Highly]))

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous 

You may add a column with IF Function.Then drag them to table visual to get the table.

Column = 
IF (
    Table1[categories] IN { "A", "B" },
    "new1",
    IF ( Table1[categories] IN { "D", "E", "F" }, "new3", "new2" )
)

1.png

Or create the table with SUMMARIZE Function.

Table = SUMMARIZE(Table1,Table1[Column],"Open",SUM(Table1[Open]),"Engaged",SUM(Table1[Engaged]),"Highly",SUM(Table1[Highly]))

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MattAllington
Community Champion
Community Champion

when you load the data (get data), go to Add Column\condtional column.  You should be able to build what you want there as an extra column



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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