![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
| With Set [CustProdTuple] as |
| With Set [CustProdTuple] as |
#3
| |||
| |||
|
|
Hi Reno, How generic does this need to be - is there a fixed set of dimensions in the tuple? For example, this query for Foodmart Sales cube assumes that the tuple contains [Customers] and [Product]: With Set [CustProdTuple] as '{([Customers].[All Customers].[USA].[CA], [Product].[All Products].[Drink])}' Cell Calculation [ExceptTuple] for '(Measures.Members)' as 'Aggregate(Except([Customers].[State Province].Members * [Product].[Product Family].Members, [CustProdTuple]), CalculationPassValue(Measures.CurrentMember, -1, RELATIVE))' select {[Measures].[Unit Sales]} on 0, [Time].[Year].Members on 1 from Sales Since AS 2005 now allows sets in the where clause, I initially thought this could be expressed more elegantly; but I'm baffled by the error in this Adventure Works query - maybe someone from [MS] could explain it? With Set [CustProdTuple] as {([Customer].[Customer Geography].[Country].&[Canada], [Product].[Product Categories].&[1])} select {[Measures].[Order Quantity]} on 0, [Date].[Calendar Year].[Calendar Year].Members on 1 from [Adventure Works] where Except([Customer].[Customer Geography].[Country].Members * [Product].[Product Categories].[Category].Members, [CustProdTuple]) - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#4
| ||||
| ||||
|
| CalculationPassValue |
| MDX functions in Analysis Services 2005 |
![]() |
| Thread Tools | |
| Display Modes | |
| |