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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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
Resident Rockstar
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

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.