Forum Discussion
SAMEPERIODLASTYEAR NOT WORKING
- 4 years ago
Hi, Anonymous
SAMEPERIODLASTYEAR is a time-intelligent function, so it is recommended to perform this function on a calendar table containing consecutive dates.
Make sure you use
CALCULATE([Measure], SAMEPERIODLASTYEAR(Calendar[Date]))rather than
CALCULATE([Measure], SAMEPERIODLASTYEAR(Facttable[Date]))You can also try using filter and DATEADD . The dates returned by SAMEPERIODLASTYEAR are the same as the dates returned by this equivalent formula:
DATEADD(dates, -1, year)Other related threads:
Function 'SAMEPERIODLASTYEAR' expects a contiguous selection Issue
Contiguous date selection error - YTD LY
sameperiodlastyear only works with contiguous date selection
Best Regards,
Community Support Team _ Eason
Hi, Anonymous
SAMEPERIODLASTYEAR is a time-intelligent function, so it is recommended to perform this function on a calendar table containing consecutive dates.
Make sure you use
CALCULATE([Measure], SAMEPERIODLASTYEAR(Calendar[Date]))
rather than
CALCULATE([Measure], SAMEPERIODLASTYEAR(Facttable[Date]))
You can also try using filter and DATEADD . The dates returned by SAMEPERIODLASTYEAR are the same as the dates returned by this equivalent formula: DATEADD(dates, -1, year)
Other related threads:
Function 'SAMEPERIODLASTYEAR' expects a contiguous selection Issue
Contiguous date selection error - YTD LY
sameperiodlastyear only works with contiguous date selection
Best Regards,
Community Support Team _ Eason