Calculate previous date for a date parameter - MDX Report
In a my MDX report, I use a date parameter linked to a time dimension.I need to determine the previous date of the parameter value: in T-SQL I can use the DATEADDIn MDX? Thanks
December 23rd, 2009 10:11pm

Hi pscorca,In MDX, we can calculate date using SQL Server Reporting Services command functions, and then pass the parameter in the MDX query.We can use the function DateAdd to do so.Example:=DateAdd("d",3,Fields!BirthDate.Value)=DateAdd(DateInterval.Day,3,Fields!BirthDate.Value)Please feel free to ask, if you have any more questions.Thanks,Jin ChenJin Chen - MSFT
Free Windows Admin Tool Kit Click here and download it now
December 25th, 2009 11:08am

Hi, I have the same issue. I need to get data for the selected date parameter value as well as for its previous day. I am able to calculate the previous day but I am not able to get data corresponding to the previous day. I tried creating a separate dataset for the previous day values but I could not link both the datasets in the report. Then I tried using sub report with previous values but that too did not work. Any help is appreciated. Thanks very much!
May 2nd, 2011 4:38pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics