Forum Discussion
Kish1999
3 years agoHelper II
Grouping and removing rows in Power Query Editor
Hello All,
I have a scenaio where I have list of projects and their various updates on certain days. I want to keep just the rows with the latest updates. I have to accomplish this in Power Query editor because i will be using this dataset for a Paginated report. Below is the sample input and output: (I can do this by creating measures and writing DAX, but i have to do this in Power query)
| Project | Update date | Comment |
| A | 05-04-2023 | asd |
| A | 07-04-2023 | zxc |
| A | 10-04-2023 | qwe |
| B | 03-03-2023 | cvb |
| B | 09-04-2023 | dgg |
| C | 08-04-2023 | rfre |
| Output | ||
| Project | Update Date | Comment |
| A | 10-04-2023 | qwe |
| B | 03-03-2023 | cvb |
| C | 08-04-2023 | rfre |
1 Reply
- DOLEARY85Resident Rockstar
Hi,
This is how i've done it:
- Duplicate the table in power query
- in the duplicate table use group by on Project with aggregation on Max of Update Date
- Merge Queries with the original table and join on Project and Date
- Expand the new column and select only comment to bring through the relevant comment
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍