Hi Francesca,
Technically speaking you would put 'dernier' before the noun when it is part of a series -
Venez chez nous le dernier week-end de juillet = Come to us on the last week-end in July
Le dernier jour de la semaine est le dimanche = The last day of the week is Sunday
But if it is placed after the noun, it means the one just gone -
Le week-end dernier, nous sommes allés à Paris = Last week-end, we went to Paris
Dimanche dernier nous avons fait une belle promenade en forêt = Last Sunday, we had a lovely walk in the woods
Hope this helps!