如何更改此脚本,使其HEAD
不在聚合函数内SUM
?
我想这样做的原因是我被警告:
在聚合函数中使用了函数“头”-这会禁用块计算模式
WITH
SET [LatestDate] AS
[Date].[Calendar].[Date].&[20060611]
MEMBER [Measures].[Sales] AS
[Measures].[Internet Sales Amount]
MEMBER [Measures].[Sales_EquivMTD] AS
Sum
(
Head
(
[Date].[Calendar].CurrentMember.Children
,11
)
,[Measures].[Sales]
)
SELECT
{
[Measures].[Sales]
,[Measures].[Sales_EquivMTD]
} ON COLUMNS
,NON EMPTY
[Date].[Calendar].[Month].MEMBERS ON ROWS
FROM [Adventure Works];