Forum Discussion

Kylli's avatar
Kylli
Regular Visitor
4 years ago
Solved

Selecting rows in Power Query

Date                      Code       Name             Price    Partner

26.07.20211819NAPA14,5Firma
06.06.20221819NAPA15,2Firma

 

If there are two different prices in the table, I want to keep only the row with the later date.

4 Replies

  • KT_Bsmart2gethe's avatar
    KT_Bsmart2gethe
    Icon for Impactful Individual rankImpactful Individual

    Hi Kylli,

     

    Step1:

    GroupBy

     

     

    Step2:

    Replace highlighted code with Table.Max(_,"Date")

     

     

    Step3:

    Expand column

     

     

    Regads

    KT

     

  • CARL12345's avatar
    CARL12345
    Regular Visitor

    Hey kylli, 

     

    sort the the colum date in descending oder. 

    Write before the formula which ist used For sorting the colums: Table.Buffer

     

    The Formula should Look Like this: 

    =Table.Buffer(Table.Sort())

    In the second step you can select colum date and colum article and remove  duplicated rows.