In this example we are trying to pull ytd based on current date using Now Function.

 

with member [Date].[Calendar].[currentyear] as aggregate(ytd((strtomember("[Date].[Calendar].[Date].&["+format(now(),"yyyyMMdd")+"]"))))

member [Date].[Calendar].[prevyear] as aggregate(ytd(parallelperiod([Date].[Calendar].[Calendar Year] ,1,(strtomember("[Date].[Calendar].[Date].&["+format(now(),"yyyyMMdd")+"]")))))

Get Complete Example on

http://blogs.msdn.com/b/karang/archive/2010/10/25/ytd-based-on-current-system-date-now-function-based-on-same-date-pulling-value-for-last-year-too.aspx