O'Reilly logo

MDX with Microsoft SQL Server 2008 R2 Analysis Services: Cookbook by Tomislav Piasevoli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing logical AND on members from the same hierarchy

This recipe shows how to implement AND logic using members from the same hierarchy. It is recommended that you read the recipe Implementing logical OR on members from different hierarchies before continuing with this recipe because you'll have a much better understanding of the problem and solution.

Getting ready

Start a new query in SSMS and check that you're working on the right database. Then type in the following query and execute it:

SELECT
{ [Measures].[Reseller Order Quantity],
[Measures].[Reseller Order Count] } ON 0,
NON EMPTY
{ [Date].[Month of Year].MEMBERS } ON 1
FROM
[Adventure Works]
WHERE
( [Promotion].[Promotion Type].&[New Product] )

The query displays all months in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required