Hi Vivek,
According to your description, you created SQL Server Reporting Sergvices report, the issue you want to get the previous day's data, right?
In this case, you can create a parameter to get the previous day, and then use this parameter to filter the data on the MDX query.
Create Parameter PreviousDay.
DateType:Date/Time
Visibility:Hidden
Default Vlaue:=Format(DateAdd("d",-1,today()),"yyyyMMdd")
Use the parameter in the MDX query like below.
select
{[Measures].[Internet Sales Amount]
} on columns,
{[Date].[Date].members} on rows
from(
select
(
STRTOMEMBER("[Date].[Date].&["+@PreviousDay+"]")
) on columns
from [Adventure Works]
)
If you have any questions, please feel free to ask.
Regards,
Charlie Liao
TechNet Community Support
No comments:
Post a Comment