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

Merge rows with same ID, but then sum the values in another row.

I have lots of rows of data some rows have duplicate values in a certain row. I want to merge those rows into one.  However there are other columns in that row that have values that I need to sum together to give a new value.  I actually have two columns in the rows. 

 

I read somewhere on this board to convert all the columns to text. So I have done that. 

 

Here is an example:

michdeblasi_0-1675874206616.png

 

I want all the rows to stay the same but sum GB Usage column, and sum Count column.  So it looks like this:

michdeblasi_1-1675874364168.png

 

I have searched the knowledgebase and cannot get the right steps.

Any help appreciated

3 REPLIES 3
amitchandak
Super User
Super User

@michdeblasi , I think a simple sum of these columns in the visual can do.

 

or you can do group by in power query https://docs.microsoft.com/en-us/power-query/group-by

 

 

All thank you for this, I finally figured out how to group by properly.  


Thank you again.

I am sorry but I am fairly new, I don't understand the sum by column, I only want the sum if there are duplicate numbers.  I don't want the entire column of GB usage to be totalled. 

 

I was doing the Group By but that didn't seem to work, it was just generating errors. 

 

It is a shame you cannot just select the rows you want to merge and they merge similar to selecting two columns.  

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.