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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Aleph18
Frequent Visitor

Power Query - delete old date versions

Hi,

I will like to keep the last data version of data for each date in the table using "edit queries", deleting oldest versions. In the below table I will like to keep the biggest version number for each date: for May 5 version 2, for May 6 version 3.

How can I do this in M?

 

Capture.PNG

 

Thank you in advance.

2 REPLIES 2
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Aleph18 

 

did you solve your problem?

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Aleph18 ,

 

you must create a subquery and group the data by date and maximum version. You can then merge the subquery with base data with an inner join

 

Check this.

PBIX

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.