我希望能够创建一个计算成员,这是每月平均月平均值。我使用带有以下MDX的adventureworks多维数据集尝试了这个:
with Member Measures.DailyAverage AS
Avg ( EXISTING
{[Date].[Date].[Date].Members},
[Measures].[Internet Order Count]
)
Member MonthlyAverageOfDailyAverage AS
Avg ( EXISTING
{[Date].[Month of Year].Members},
Measures.DailyAverage
)
select {(DailyAverage),(MonthlyAverageOfDailyAverage)} on columns,
[Date].[Calendar Year].Members on rows
from [Adventure Works]
这不会产生我期待的答案,仅看看2005年,7月有146个互联网订单,31天有订单,因此每日平均值为4.709,8月份的日均值为5.2,9月= 5.379, 10月= 5。2,11月= 5.2,12月= 5.032。我想要这些日平均值的平均值应为5.120。上面的MDX给了我5.588。我的计算成员应该得到什么? 感谢
答案 0 :(得分:0)
您的手动计算仅在7月和8月确认
with Member Measures.DailyAverage AS
Avg ( EXISTING
{[Date].[Date].[Date].Members},
[Measures].[Internet Order Count]
), format_String="##.000000"
select (DailyAverage) on 0,
[Date].[Calendar Year].&[2005] * [Date].[Calendar].[Month] on 1
from [Adventure Works]
菲利普,