Sqlserver
 sql >> Base de Dados >  >> RDS >> Sqlserver

MDX Como calcular a medida em relação à dimensão sem exibir membros nos resultados

WITH MEMBER [Measures].[A] AS
   [Measures].[Internet Order Count] + [Measures].[Reseller Order Count]
SELECT
{ [Measures].[Internet Order Count], [Measures].[A] } ON COLUMNS,
 [Date].[Calendar].[Month] ON ROWS
 FROM (
   SELECT { [Measures].[Internet Order Count] } ON COLUMNS,
   Filter (
     Filter ( [Date].[Calendar].[Month] * [Delivery Date].[Calendar].[Month], [Date].[Calendar].CurrentMember.Name = [Delivery Date].[Calendar].CurrentMember.Name ) * [Sales Territory].[Sales Territory Country].[Sales Territory Country],
     [Measures].[Internet Order Count] + [Measures].[Reseller Order Count] > 100
   ) ON ROWS
   FROM [Adventure Works]
 )
WHERE [Date].[Calendar Year].[CY 2008]