The Last function will return a value from the specified field of the last related record.

Option 2:

Sorting the portal records--either as a portal setup option or in the underlying relationship can be used to make the most recently created portal record the first record in the portal and the data that will be returned if, from the context of the layout's table occurrence, you refer to fields from the portal's table (such as by putting fields from the portal's table directly on the layout without any portal.)

I really have no more details to provide, but you might. A detailed description of the tables/relationships involved and how you attempted to use this function might shed light on why it has not worked for you.