Starting with the release of Strategy ONE (March 2024), dossiers are also known as dashboards.
Using a derived metric with a transformation style formula only works in reports, and not in dossiers.


If you create the derived metric, Sum(Cost) {~} | [Last Month's] |, in a report, it works like a SQL metric, and the correct data (calculated by SQL) is returned.
However, if you create the same derived metric in a dossier, the transformation part is lost, and it is calculated as without [Last Month's]. This is the same behavior for a derived metric in Analytical Engine and aggregate from base.
Create a grid report with a transformation derived metric, and use the report as the dataset of the dossier.