Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello,
I have the following table in Power Query and i am trying to add step/s that would remove all duplicate Document ID's but keep only the corresponding most recent Modified Date. Is this possible? Any help is much appreciated!
| Document ID | Modified Date |
| 3998 | 14/09/2022 |
| 4050 | 04/08/2022 |
| 4050 | 01/08/2022 |
| 4060 | 10/07/2022 |
| 4060 | 22/07/2022 |
| 4139 | 20/07/2022 |
| 4145 | 15/07/2022 |
| 4145 | 05/07/2022 |
| 4145 | 05/07/2022 |
| 4160 | 15/07/2022 |
| 4160 | 06/07/2022 |
| 4164 | 25/09/2022 |
| 4164 | 25/09/2022 |
| 4187 | 15/07/2022 |
| 4187 | 23/10/2022 |
| 4187 | 08/09/2022 |
| 4187 | 05/08/2022 |
Expected results:
| Document ID | Modified Date |
| 3998 | 14/09/2022 |
| 4050 | 04/08/2022 |
| 4060 | 22/07/2022 |
| 4139 | 20/07/2022 |
| 4145 | 15/07/2022 |
| 4160 | 15/07/2022 |
| 4164 | 25/09/2022 |
| 4187 | 23/10/2022 |
Solved! Go to Solution.
In Power Query, this is a Group By on ID with an aggregation for Max of Modified Date (All done via the interface)
In Power Query, this is a Group By on ID with an aggregation for Max of Modified Date (All done via the interface)