Forum Discussion
stribor45
Post Prodigy
1 year agoSelecting Rows by Max Date and something else
I have table where multiple rows with same ID may exist but with different or sometimes same values in Date column. Of course I can group this by ID and select ones with MAX date however since some...
- 1 year ago
Table.FromRecords( Table.Group(Source, "id", {"recs", (x) => Table.Max(x, {"Date", (w) => - w[Decision column]})})[recs] )
stribor45
Post Prodigy
1 year agoFor example the top is the table I start with and below it is the table I want to end up with. If the date column is the same for the the particular id then I keep the roiw with lowest number in Decision column
AlienSx
Super User
1 year agoTable.FromRecords(
Table.Group(Source, "id", {"recs", (x) => Table.Max(x, {"Date", (w) => - w[Decision column]})})[recs]
)