Forum Discussion
Creating a table with Only the latest rows
So is it a case of wanting to return not the row where the date is the maximum of all rows but the rows where the date is the maximum for that particular caseid? For eample you might have caseid1 with a maximum date of 1/1/2018 and caseid with a maximum date of 31/10/2018 and you wish to show both?
If thats the case do it in power query. group by caseid and return the max date in the aggregation. something like 5 or 6 clicks to do it
// if this is a solution please mark as such
Hmmm... Maybee I am not explaining it too well as grouping does not work at all for what I am trying to do.
#1 - I have 800 rows with a CASEID and and EVENT_DATE and NEXT_EVENT_DATE
#2 - I need to go through each row and only return the Latest EVENT_DATE per Case.
Note - This means that there will be no duplicate case numbers, and that for the case number that gets returned Only the row with the Latest EVENT_DATE is returned. Some cases have 5 or more rows of events with differentr dates.
#3 - That means only 1 case and only 1 event per case is returned. A single row for each case will be returned.
#4 - The resulting dataset should be around 300 rows becouse there would be NO duplicates what so ever and ONLY the row with the Latest Event Date would be returned for each case.
I have tried for several hours and nothing works.