Reposting the answer from microsoft.beta.reporting.services.general. Please
let me know if this didn't work for you.
The answer really depends on how you designed your cube.
I assume, that you have standard Time dimension - then your query could look
something like
WITH MEMBER Measures.PeriodSales AS ' Aggregate( Time.FromDate :
Time.ToDate, Sales ) '
SELECT {Measures.PeriodSales} ON COLUMNS, something else ON ROWS
FROM cube
To make FromDate and ToDate parameters - you will have to do string
concatenation of the query, i.e.
"WITH MEMBER Measures.PeriodSales AS ' Aggregate( Time.[" +
Parameters!FromDate.Value + "] : Time[" + Parameters!ToDate.Value + "],
Sales ) ' " +
"SELECT {Measures.PeriodSales} ON COLUMNS, something else ON ROWS " +
"FROM cube"
--
==================================================
Mosha Pasumansky - http://www.mosha.com/msolap
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================
"John Chen" <anonymous (AT) discussions (DOT) microsoft.com> wrote
Quote:
MDX DATE PARAMETER:
In TSQL WE CAN write:
SELECT * FROM Employees
WHERE Hiredate > ='01/01/1988'
AND Hiredate < ='12/31/1998'
How can I do in MDX: I want to put the date as a
parameter in SQL Server Reporting Service. |