0

I have a query as such

DRILLTHROUGH
SELECT NON EMPTY { [Measures].[#] } ON COLUMNS,
NON EMPTY
{
  ( [Location].[Name].[Name].&[Test Location] )
}  ON ROWS
FROM (
  SELECT (
  { [v Item].[Item].&[Option 1], [v Item].[Item].&[Option 2], [v Item].[Item].&[Option 3] } ) ON 0
  FROM [TestCube]
)

Without the Drillthrough the query returns the correct results/cell; however, with the drillthrough the subcube

 SELECT (
      { [v Item].[Item].&[Option 1], [v Item].[Item].&[Option 2], [v Item].[Item].&[Option 3] } ) ON 0
      FROM [TestCube]

is completely ignored. What am I doing wrong here?

Ajwhiteway
  • 986
  • 1
  • 9
  • 23

1 Answers1

1

The problem was the ON ROWS.

Way to do this

DRILLTHROUGH
SELECT NON EMPTY { [Measures].[#] } ON COLUMNS
FROM (
  SELECT (
  { [v Item].[Item].&[Option 1], [v Item].[Item].&[Option 2], [v Item].[Item].&[Option 3] } ) ON 0,
  {[Location].[Name].[Name].&[Test Location]} ON 1
  FROM [TestCube]
)
Ajwhiteway
  • 986
  • 1
  • 9
  • 23
  • is the subselect even required is this not possible with a WHERE clause? – whytheq May 19 '16 at 20:37
  • This ` { [v Item].[Item].&[Option 1], [v Item].[Item].&[Option 2], [v Item].[Item].&[Option 3] }` breaks the drillthrough inside of a WHERE clause – Ajwhiteway May 19 '16 at 21:08
  • I just a little surprised that the context of the subselect is available to the drillthrough - interesting behaviour. – whytheq May 19 '16 at 22:54
  • Yeah...I fought with it for awhile. I guess it has trouble making slicer axis on its own in drillthroughs (when the same dimension is used more than once) – Ajwhiteway May 19 '16 at 23:05