Forum Discussion
jerryr0125
1 year agoNew Member
Power Query - Keep Rows based upon maximum date?
Hi - I know there is a command in Power Query to 'keep rows', but is there a way to keep specific rows based upon the maximum date in the table ? Example - transactiontable - start Date Tra...
- 1 year ago
Hey jerryr0125 ,
Use the following M code that should full fill your requirements:
let
Source = transactiontable,
MaxDate = List.Max(Source[Date]),
FilteredRows = Table.SelectRows(Source, each [Date] = MaxDate)
in
FilteredRowsResult:
Also check the attached pbix file.
Best Regards,
Nasif Azam
jerryr125
Helper IV
10 months agoHi - none of these answers produce the outcome required - any thoughts ?
v-aatheeque
Community Support
10 months agoHi jerryr125
Thanks for the update. Since none of the suggested approaches produced the expected outcome, could you please share a small sample of the data (with any sensitive information removed) along with the expected result? This will help us better understand the scenario and provide a more accurate solution.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community