I am trying to filter a query by two (multi select) parameters.
It works fine when doing this for the first one, but complains when I add the the second one.
Is my syntax wrong is there a better way to achieve what I want?
I am trying to filter a query by two (multi select) parameters.
It works fine when doing this for the first one, but complains when I add the the second one.
Is my syntax wrong is there a better way to achieve what I want?
MDX WHERE has very little in common with SQL WHERE. MDX WHERE does not effect the number of rows that return, just which cube slice the cells are to be retrieved from.
I would use the FILTER function since a MDX WHERE clause must be a tuple (cell address), no more no less, i.e.,
(Dim1.Member, Dim2.Member, etc.)
Hope this helps.
Tried subqueries?
SELECT
[Measures].[YourMeasure]
ON COLUMNS,
[Dimensions].[YourDimension]
ON ROWS
FROM
(SELECT STRTOSET(@p1) ON COLUMNS FROM
(SELECT STRTOSET(@p2) ON COLUMNS FROM
[YourCube] ) )