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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Kylli
Regular Visitor

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.

2 ACCEPTED SOLUTIONS
KT_Bsmart2gethe
Impactful Individual
Impactful Individual

Hi @Kylli,

 

Step1:

GroupBy

KT_Bsmart2gethe_2-1662415086900.png

 

 

Step2:

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

 

KT_Bsmart2gethe_3-1662415129229.png

KT_Bsmart2gethe_4-1662415173094.png

 

Step3:

Expand column

KT_Bsmart2gethe_5-1662415236522.png

KT_Bsmart2gethe_6-1662415284324.png

 

 

Regads

KT

 

View solution in original post

4 REPLIES 4
KT_Bsmart2gethe
Impactful Individual
Impactful Individual

Hi @Kylli,

 

Step1:

GroupBy

KT_Bsmart2gethe_2-1662415086900.png

 

 

Step2:

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

 

KT_Bsmart2gethe_3-1662415129229.png

KT_Bsmart2gethe_4-1662415173094.png

 

Step3:

Expand column

KT_Bsmart2gethe_5-1662415236522.png

KT_Bsmart2gethe_6-1662415284324.png

 

 

Regads

KT

 

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.

Hi,

 

Sorry, I didn't make my question clear.

 

There are many rows in the table. Most have one price per code.

Sometimes there are two or more prices per code.

If there are more prices, the latest in terms of date should be taken into account.

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.