Forum Discussion

Kish1999's avatar
Kish1999
Helper II
3 years ago

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)

 

ProjectUpdate dateComment
   
A05-04-2023asd
A07-04-2023zxc
A10-04-2023qwe
B03-03-2023cvb
B09-04-2023dgg
C08-04-2023rfre
   
Output  
ProjectUpdate DateComment
A10-04-2023qwe
B03-03-2023cvb
C08-04-2023rfre

1 Reply

  • DOLEARY85's avatar
    DOLEARY85
    Resident Rockstar

    Hi,

     

    This is how i've done it:

     

    1. Duplicate the table in power query
    2. in the duplicate table use group by on Project with aggregation on Max of Update Date
    3. Merge Queries with the original table and join on Project and Date 
    4. 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 👍