Merge rows based on date in excel or power query

Copper Contributor



I'm working on formatting an automatically-generated to slide into an existing excel sheet. The problem I can't seem to fix is that there exists multiple entries for flights that have multiple hour type components. As you can see in the screenshot, I've already done a pivot so that the last 6 columns should be able to merge nicely by date. All the other data should be an exact match where the dates are the same just based on how that data is populated. An example of the issue is row 52 and 53. I want a way to merge those rows where the dates are duplicated.




the desired output would only change rows 42-43 and 57-58 in this example here. Please note that in some cases there are 4-5 rows for the same date, and additionally sometimes the duplicate dates have hour components that are the same, in these cases they would need to be added together.


Hope this made sense, thanks for the help in advance. This community is really helpful.

1 Reply
For posterity: I ended up getting a solution to my problem via inspiration from a YouTube video on a similar topic. What ended up fixing the problem was I used the "group by" functionality in Power Query to match rows based on columns A:L, That ensured that all relevant data was grouped into a single row by flight event.