YTD Based on Current System Date (Now() Function), based on same date pulling value for Last Year too.


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

Comments (0)

Skip to main content