sql >> Databasteknik >  >> RDS >> Sqlserver

MDX Hur man beräknar mått mot dimension utan att visa medlemmar i resultat

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]


  1. Returnera lagrade procedurer och funktioner i en SQL Server-databas:RUTINER (T-SQL-exempel)

  2. Inte lika <> !=operator på NULL

  3. JPA och 1000 ID används i Oracle IN Operator

  4. Lagra bilder i en mysql-databas