Drillthrough failed because the coordinate identified by the SELECT clause is out of range.
Ever gotten message shown above when using DRILLTHROUGH in SSAS? I prepared the Integrating Analysis Services 2005 and Reporting Services 2005 with DRILLTHROUGH series after encountering significant problems with drillthrough on a real project that absolutely required drillthrough. Solving the drillthrough mystery was not the easiest problem ever solved, and just when we thought every problem was conquered, another one struck.
My teammate encountered this error while authoring a report that quried a sample SSAS database I built with data only for October 2006. (The database was for a client.) Despite only one month if fact data, the Date dimension had several years’ members. He wrote a multidimensional selector component which extended Reporting Services to navigate a multidimensional hierarchy, and he was testing this with the report using our newfound drillthrough solution.
His initial query looked like this:
DRILLTHROUGH
SELECT
NON EMPTY
[Measures].[SomeMember] ON COLUMNS
FROM
[SomeCube]
WHERE
[Date].[Calendar].[Month].[Oct 2006]
He then parameterized the query to insert any month into the WHERE clause after the user picked a month in the selector component. While testing, everything worked as long as he picked October 2006, which actually had data. As soon as he picked any month other than October 2006, a strange error occurred, shown below:

How can a coordinate identified by the SELECT clause of an MDX query be out of range? By definition, SSAS requires one coordinate from every hierarchy, andd if one is not supplied by the query then SSAS uses default members. It seems impossible to "identify" a coordinate that is "out of range."
I conjured two possible causes.
- In SSRS, a DMX query is used to make drillthrough work. Perhaps this was an error related to DMX.
- The error had nothing to do with MDX or DMX at all. Since drillthrough queries are not answered as MDX queries, perhaps this error was actually thrown by the code executing the DRILLTHROUGH statement.
I had no way of directly testing the first possibility. But I was able to triangulate to the second possibility because the MDX query worked perfectly when the DRILLTHROUGH keyword was removed. I also knew that the query could only return one cell because by definition, drillthrough acts upon a single cell. For Oct 2006, the returned cell had a numerical value because the dates descended from Oct 2006 had data. For Sep 2006, the returned cell had a NULL numerical value because none of the dates descended from Sep 2006 had data. Said in the vernacular, the cell was empty.
To illustrate this, I’ve modified Adventure Works DW by deleting the Reseller_Sales_2003 partition in the Reseller Sales measure group. The following query shows that there is now no data for [Ship Date].[Calendar].[Calendar Year].&[2003].
SELECT
Measures.[Reseller Sales Amount] ON COLUMNS,
[Ship Date].[Calendar].[Calendar Year].Members ON ROWS
FROM
[Adventure Works]
That query returns the following cellset.m Note that CY 2003 is now empty, a result of deleting the the partition with CY 2003's data.

The following query is analogous to the real-world query which produced the error, but without the DRILLTHROUGH keyword.
SELECT
NON
EMPTY Measures.[Reseller Sales Amount] ON COLUMNS
FROM
[Adventure Works]
WHERE
[Ship Date].[Calendar].[Calendar Year].&[2003]
That query returned the following cellset.

Two interesting observations emerge from the answer returned to Microsoft SQL Server Management Studio.
- The Results tab is completely blank. (Not shown in the screenshot above.)
- The Messages tab, however, displays the information pictured below.
This message indicates that the cell set consists of 1 row and 0 columns. To be honest, I’m not sure what this means, but I know it is significant because things change when the NON EMPTY keyword is removed.
First, the Results tab is no longer blank, as shown below.

Second, the Messages tab has a different message than before.

So, comparing the two, when the NON EMPTY keyword is present, no cells are returned, and "1 rows and 0 columns" is the technical way of describing this. When the NON EMPTY keyword is removed, one empty cell is returned (as expected) and "2 rows and 1 columns" is the technical way to say this.
At this point I had a major clue. This must be a problem when DRILLTHROUGH was combined with NON EMPTY. Removing NON EMPTY and putting DRILLTHROUGH back in the query returned the following result.

And this was the Messages tab.

Bingo! The error at the beginning of this article is caused when drillthrough executes on a cellset that does not exist. The following two items are now evident.
- DRILLTHROUGH will not work when the cell set consists of zero cells, which would be produced by a NON EMPTY query against a cell which has no data. This is perfectly sensible since drillthrough acts upon a single cell. Naturally, when there is no cell, there can be no drillthrough.
- DRILLTHROUGH will work when the cell set consists of one empty cell. In such a case, DRILLTHROUGH returns no rowset, which is the expected case for an empty cell since it has no value. There is no fact row for this cell; DRILLTHROUGH should return nothing.
In other words, DRILLTHROUGH must have a real cell set upon which to act, even if that cell set is a lone empty cell. This gives rise to an important rule for drillthrough queries.
Do not use the NON EMPTY keyword in a DRILTHROUGH query.
IMPORTANT NOTE: This rule applies ONLY to queries using the DRILLTHROUGH keyword. As noted in my four parter on drillthrough, it is possible to emulate a drillthrough query by using a crossjoin MDX query. The NON EMPTY prohibition does NOT apply to the crossjoin approach; indeed, NON EMPTY may be desired in certain circumstances.