Limiting the query output

MDX supports multiple ways of limiting query results. You could use the WHERE clause, often referred to as slicer, since it limits the result set by specifying a data slice. You could also use the FILTER function to specify the criteria for members included on each axis and thereby derive a more focused result set.

While reviewing the results of queries, as shown in the previous section, you probably noticed that the result sets included some empty cells. As you might imagine, large cubes could include many empty cells, and such data may or may not be desirable in the query's output. You have a couple of options for limiting the output to only non-null (non-empty) values.

How to do it...

Let's get started with limiting the ...

Get SQL Server Analysis Services 2012 Cube Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.