Forum Discussion
jerryr0125
9 months 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...
- 9 months 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
7 months agoHelper IV
Hi - none of these answers produce the outcome required - any thoughts ?
- v-aatheeque7 months agoCommunity Support
Hi 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