Datatable with only the last results on a certain term?

Hi there, i am trying to visualize a datatable that contains documents but i only want to display the latest rows per for example "project-code"..

Screenshot 2020-03-13 at 10.34.18

Any hint on how to achieve this?

I tried to set a x-axis metric based on a 'top-hit' but this has no effect.
Any suggestions are appriciated!

This is the way to do it. Only difference is that you should use the Date field instead of the @timestamp, judging by your screenshot there.