I would create a flag in your master calendar (click here among a lot of posts on how to create a master calendar) with all possible dates with YearToDate function something like
YearToDate(DateField, -1) as LYFLag,
. Then, adding this to the set analysis is pretty simple