我需要比较五维选择中的每个项目 到位于 两个 维度
的交叉点的单元格我有以下MDX:
WITH MEMBER [measures].[x] AS
(
[dim1].[dim1].[certainDim1_Member]
,[dim2].[dim2].[certainDim2_Member]
,[measures].[a]
)
SELECT
NON EMPTY {[measures].[a], [measures].[x]} ON 0,
NON EMPTY {
[dim1].[dim1].children
*[dim2].[dim2].children
*[dim3].[dim3].children
*[dim4].[dim4].children
*[dim5].[dim5].children
} ON 1
FROM [cubename]
问题是查询考虑了dim3,dim4,dim5的currentmember
。
结果是扭曲的。
当我尝试这个时:
WITH MEMBER [measures].[x] AS
(
[dim1].[dim1].[certainDim1_Member]
,[dim2].[dim2].[certainDim2_Member]
,[dim3].[dim3].[all]
,[dim4].[dim4].[all]
,[dim5].[dim5].[all]
,[measures].[a]
)
由于内存不足
,查询会在2分钟内死亡虽然这个
WITH MEMBER [measures].[x] AS
(
[dim1].[dim1].[certainDim1_Member]
,[dim2].[dim2].[certainDim2_Member]
,[dim3].[dim3].[all]
,[dim4].[dim4].[all]
--,[dim5].[dim5].[all]
,[measures].[a]
)
在3秒内返回结果。
我必须使用所有5个维度甚至更多。
答案 0 :(得分:0)
如果将其更改为该度量的一组元组的聚合,它是否仍然有效?
WITH MEMBER [measures].[x] AS
Aggregate(
{(
[dim1].[dim1].[certainDim1_Member]
,[dim2].[dim2].[certainDim2_Member]
,[dim3].[dim3].[all]
,[dim4].[dim4].[all]
,[dim5].[dim5].[all]
)},
[measures].[a]
)