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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
ChrisLatta
New Member

Merging rows into one row to include a total

I PowerBi and an expenses spreadsheat to create a bank transfer file. I do this by combining the data from the report into one txt file that the bank can read.

 

The data source includes multiple rows of the same person submitting expenses during the period i.e

user1 £2

User1 £5

user2 £2

 

What i would like to do is merger the rows in PoweerBI that contain the same user BUT add the expenses together so the result is:

User1 £7

User2 £2

 

how can i automate this using transform in PowerBI without the user manually merging every 2 weeks when new data is produced?

 

 

 

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @ChrisLatta -Please follow the below steps in power query editor to do:

 

In Power BI Desktop, go to the Home tab and click Transform Data to open the Power Query Editor.
Group the Data:

Select the column containing the user names (e.g., "User").
Go to the transform tab in the Power Query Editor and click Group By.
Configure the Group By Operation:

In the Group By window:
Group By: Select the column containing the user names (e.g., "User").
Operation: Choose Sum for the column containing expenses (e.g., "Amount").
Rename the aggregated column if desired (e.g., "Total Expenses").
Load the Transformed Data:

Click Close & Apply to load the transformed data into Power BI.

 

 

rajendraongole1_0-1736957835036.png

 

output:

 

rajendraongole1_1-1736957969700.png

 

 

Hope this helps.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi,

Thanks for the solution rajendraongole1  offered, it is greate and i want to offer some more information for user to refer to.

hello @ChrisLatta , you can create a calculated table.

 

Table 2 = SUMMARIZE('Table',[User],"Sum",SUM('Table'[Amount]))

 

Output

vxinruzhumsft_0-1737008063222.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

thanks for the alternative

rajendraongole1
Super User
Super User

Hi @ChrisLatta -Please follow the below steps in power query editor to do:

 

In Power BI Desktop, go to the Home tab and click Transform Data to open the Power Query Editor.
Group the Data:

Select the column containing the user names (e.g., "User").
Go to the transform tab in the Power Query Editor and click Group By.
Configure the Group By Operation:

In the Group By window:
Group By: Select the column containing the user names (e.g., "User").
Operation: Choose Sum for the column containing expenses (e.g., "Amount").
Rename the aggregated column if desired (e.g., "Total Expenses").
Load the Transformed Data:

Click Close & Apply to load the transformed data into Power BI.

 

 

rajendraongole1_0-1736957835036.png

 

output:

 

rajendraongole1_1-1736957969700.png

 

 

Hope this helps.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thank you, that worked

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors