I have been struggling with this all week and have yet to find an answer. I have a fairly simple report with an Analysis Services Cube as the Data Source.
I am attempting to set the TimeDate parameter's default value to the previous date. I am familiar with how to do this normally, but am having difficulty with MDX.
The following expressions does work, but pulls 1/8/2011 as the Cube's data value are based on the number of days since 1/1/2011 (eg the value '1136' generates 2/9/2014).
="[Time Date].[Date].&["+DAY(CSTR(DAY(NOW())+"]"
The following should work:
="[Time Date].[Date].&[" + DateDiff(DAY, Date(2011, 1, 1), Today()) + "]"
See http://technet.microsoft.com/en-us/library/aa337092.aspx for the date functions of Reporting Services.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.