Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Kish1999
Helper II
Helper 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)

 

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 1
DOLEARY85
Super User
Super User

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

DOLEARY85_0-1681210022803.png

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.