Forum Discussion

vishaln's avatar
vishaln
New Member
6 years ago
Solved

Delete rows based on condition in M PoweQuery

Hi,

 

How can I delete the rows that do not contain highlighted cells? The highlighted cells contain the most recent order date for a particular customer id. I want to keep only the rows where the Order Date is the latest one and remove all other rows for a particular Customer ID.

When I apply remove duplicates on ORDERDATE then it shows the first Order Date for a particular Customer ID which is not useful for me.

 

Thanks for your help!

 

 

 

  • Hi,

    In the Query Editor, right click on the first column and go to Group.  Select Max in the function there.

    Hope this helps.

3 Replies

  • Hi,

    In the Query Editor, right click on the first column and go to Group.  Select Max in the function there.

    Hope this helps.