【发布时间】:2016-01-26 14:44:03
【问题描述】:
我有一些带有计算成员的 MDX 查询,而不是在 SSMS 中运行它们时运行得非常快。 但是当我在多维数据集中实现这些计算成员并运行它们时,速度非常慢。 对这种行为有任何想法吗?
这是在 SSMS 中流畅运行的查询,但是当我从 Excel 或 Tableau 查询多维数据集时(针对多维数据集中的相同计算成员),它需要很长时间
with member [Measures].[Sales BUM Avg 3Months]
as
sum(
lastperiods(3, ancestor([Date].[Calendar].currentMember,[Date]. [Calendar].[Calendar Year Month])), [Measures].[Sales Month BUM]
)
/
count(
nonempty(lastperiods(3, ancestor([Date].[Calendar].currentMember,[Date].[Calendar].[Calendar Year Month])), [Measures].[Sales Month BUM])
)
member [Measures].[CoverageSalesBUM]
as
sum([Measures].[Unrestricted BUM])
/
sum([Measures].[Sales BUM Avg 3Months] )
select non empty { [Measures].[Unrestricted BUM] , [Measures].[Sales BUM Avg 3Months] } on 0
,non empty([Date].[Calendar].[Calendar Date] , [Plant].[Plant].[Plant],[Material].[Material].[Material].[149249] ) on 1
from [InventCoverage]
【问题讨论】:
-
也许在多维数据集中创建计算度量后尝试重建聚合。
-
您能否发布一些示例 MDX 查询以及您添加到多维数据集的相同调用?