NEWBIE MDX WHERE how to parameterise -
09-13-2006
, 06:38 AM
I would like to run an MDX query that looks something like:-
SELECT
{[Measures].[Enrolments]}
ON COLUMNS,
([College].[College Id].[College Id], [College].[College
Name].[College Name])
ON ROWS
FROM
[ACube]
WHERE
([College].[College Id].[@PARAM]);
This does not work because [College].[College Id] is on an axis and in
the slicer dimension.
My problem is that I want the MDX to return a dataset for reporting
services. If @PARAM is a numeric, data for one college is returned. If
@PARAM is "All", a list of colleges is returned. I need the College Id
to pass into sub reports, but I can't put it in the ROWS axis because
it is in the WHERE clause.
I've tried FILTER, but this is a much simplified example of what I
want, and I am worried FILTER will be slow. I do not own the cube but I
can request that changes be made to it.
Any help would be appreciated. |