Forum Discussion

Aleph18's avatar
Aleph18
Frequent Visitor
7 years ago

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?

 

 

Thank you in advance.

2 Replies

  • mwegener's avatar
    mwegener
    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.

  • mwegener's avatar
    mwegener
    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.