Overview
SAMEPERIODLASTYEAR shifts the active date filter context back exactly one calendar year while preserving the grain of the current period (day, month, quarter). It is the standard function for year-over-year (YoY) comparisons in time-intelligence measures.
It requires a contiguous Date table marked as a date table and an active relationship between your fact table and that Date table.