@varmekontrol here you have grouped by all dimensions, that's why the output will keep all rows Max of a row is a row, if I understood well you need :
FirstSortedValue(works_id, -period_end) as works_id,
(txt, utf8, embedded labels, delimiter is ';', msq) Group By admin_id, property_no, property_name;
otherwise you can share a sample data with the output to propose something else.
Regards, Taoufiq ZARRA
"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "
Here is some data to help you, sorry for the lack of it.
Here you can see that the admin_id 251359 is present multiple times, because of different dates in period_end I would like to only keep one record, that is the record were the latest period_end is 31-05-2020