Sqlserver
 sql >> Database >  >> RDS >> Sqlserver

MDX Come calcolare la misura rispetto alla dimensione senza visualizzare i membri nei risultati

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]