Forum Discussion

bilingual's avatar
bilingual
Icon for Helper V rankHelper V
6 years ago
Solved

SAMEPERIODLASTYEAR - does not work with Weeknr, any alternatives?

Hi, i use SAMEPERIODLASTYEAR mostly with success on day and month level, however, it does not seem to work with Weeknumbers, as it uses the dates from the present year instead of the dates in the week  does anybody has a workaround:

My formula

CALCULATE((SUM(Data_akk[number of trips])),SAMEPERIODLASTYEAR(Calender[Date]))
 
I have tried with 
CALCULATE((SUM(Data_akk[number of trips])),SAMEPERIODLASTYEAR(Calender[Weeknr]))
 
But it does not accept Weeknr as a valid date
 

2 Replies