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
lkshck
Helper III
Helper III

Merge Rows based on ID column and Sum number Values in Third column

Hey,

I have the following Table visual and I want to merge the rows based on the Column "PartNumber" as this one contains a lot of duplicates. In addition the Column "Sum of Cost" should calculate the Total based on the "PartNumber". 

ProductPartNumberSum of Cost
Virtual Network PeeringAAD-12345500,00€
Virtual Network PeeringAAD-12345256,66€
Virtual Network PeeringAAD-1234525,99€
Event HubsAAB-6789600,00€
Event HubsAAB-6789123,45€
IoT HubAAA-45678800,00€
IoT HubAAA-45678799,99€ 

Is there any way to do it directly via the Table visual?

 

Thanks in advance!

1 ACCEPTED SOLUTION
lkshck
Helper III
Helper III

Got it solved as I added more columns with additional data to the table and those columns were defined as "Don't group". Underlying data is based on daily data, this was the reason it wasn't group. So topic can be closed.

View solution in original post

3 REPLIES 3
lkshck
Helper III
Helper III

Got it solved as I added more columns with additional data to the table and those columns were defined as "Don't group". Underlying data is based on daily data, this was the reason it wasn't group. So topic can be closed.

jaweher899
Super User
Super User

Yes, you can do it directly in the Table visual. To merge rows based on the Column "PartNumber" and sum the values of the "Sum of Cost" column, you can follow these steps:

  1. Create a calculated column to sum the values of the "Sum of Cost" column, using the formula =SUMX(GROUPBY(TableName, TableName[PartNumber]),TableName[Sum of Cost]). Replace "TableName" with the name of your table.

  2. Create a new table visual by going to "Modeling" in the ribbon, then selecting "New Table" and "Blank Table".

  3. In the new table, add the columns "Product" and "PartNumber" from the original table, and the calculated column created in step 1.

  4. Group the new table by the "PartNumber" column.

  5. Delete the original table visual and replace it with the new table visual.

Now you will have a table with the merged rows based on the "PartNumber" column and the calculated "Sum of Cost" values.

Thanks for providing this solution. Do you know if this works also for a Report which has a Live connection to an already published dataset? As the underlying is very large and complex I created a simple report which is jused based on this dataset, to not duplicate the complete dataset.

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.