you'll have to explain a bit more how this expression doesn't work with current selection. What selection do you make and what's happening wrongly?
I have a feeling that there is a syntax error in your expression - looks like one of the closing quotes might be misplaced.
Also, I'd recommend to simplify your expression by moving the IF question back to the load script and defining a "flag" that can determine whether the date DaysFilled.Date is within the last 52 weeks from today:
load
...
if (InWeek (DaysFilled.Date, (Today()), -52), 1, 0) as Flag_52Weeks,