Forum Discussion
Need help to merge multiple data sets and sum certain columns subject to other fields meeting criteria
I have a years worth of monthly submitted data (12 files total, individual files are large) and I want to aggregate rows subject to columns matching, summing one column. So if I had column a, b, c, d, and e. I want values in e summed if column b, c, d values are identical on other rows. Excited to figure this out.
9 Replies
- lbendlinSuper User
Power Query has integrated Group By options for that. Have you tried that?
Ideally you would not need to do anything as Power BI is automatically grouping your data for you.
- Syndicate_AdminAdministrator
we have tried it, but we were unable to produce the file with identical label row as the initial file. I feel like there is an easy solution I am just missing it.
- lbendlinSuper User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- Syndicate_AdminAdministrator
I've attached 2 sample excel files. PBI1 is the first month and PBI2 is the second.
Order of Operations
Group by column D (ReportingFacilityID) IF Column M (AcitivityID) and Column N (ProductID) are the same, sum Column O (Volume) in to one row.
- lbendlinSuper User
Like this?
- Syndicate_AdminAdministrator
I'd like to have all the column titles from other fields come over as well. Location, Operator, etc. I can't tell if it looks like it worked or not as it is very blurry. Apologies.
- lbendlinSuper User
You can either group, or have all columns. Not both.
- Syndicate_AdminAdministrator
would you be willing to have a call with me to discuss how to do this?
- lbendlinSuper User
sorry, forum only. If you need professional advice you can contact one of the certified Microsoft partners in your area.