Forum Discussion
Find the Max Date by Year for Multiple IDs Using Two Columns with Multiple Years in Power Query
- 3 years ago
Hi,
Thanks for your response. However, I don't have duplicate rows in my data - those have already been removed. I need the most recent recording date per year (2018, 2019, 2020, 2021 2022) for each unique ID. Each unique ID should be left with the most recent recording date for every year which would result in 4-5 rows per unique ID.
Hi,
Thanks for your response. However, I don't have duplicate rows in my data - those have already been removed. I need the most recent recording date per year (2018, 2019, 2020, 2021 2022) for each unique ID. Each unique ID should be left with the most recent recording date for every year which would result in 4-5 rows per unique ID.
Yes, by highlighting ID and Year and removing duplicates, it will only remove rows where the Year and ID are the same. By using sort, then table buffer before doing this then it will keep the latest date for each ID in each year.
removing duplicates does not necessarily remove duplicate rows. It removes duplicate instances of the column(s) selected. While your dataset doesn't have duplicate rows, it does have rows where both the year and the ID are the same.
- MSargeant3 years agoFrequent Visitor
Many thanks for the additional explanation. The solution worked well.
Thank you!