Sales-PW = VAR CurrentWeek = SELECTEDVALUE( 'Calendar'[WeekNo] ) VAR CurrentYear = SELECTEDVALUE( 'Calendar'[Year] ) VAR MaxWeekNo = CALCULATE( MAX ( 'Calendar'[WeekNo] ), ALL ( 'Calendar' ) ) RETURN SUMX( FILTER( ALL ( 'Calendar' ), IF ( CurrentWeek = 1, 'Calendar'[WeekNo] = MaxWeekNo && 'Calendar'[Year] = CurrentYear -1, 'Calendar'[WeekNo] = CurrentWeek -1 && 'Calendar'[Year] = CurrentYear ) ), [Total Sales] )