本文介绍了多个维度的总计TOTAL的计算成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用计算的度量AS总计一个度量
I am trying to TOTAL a measure with a calculated measure AS
CALCULATE;
CREATE MEMBER CURRENTCUBE.[Measures].[Total On Hand Amount]
AS ([Warehouses].[Warehouses].[All],[Measures].[On Hand Amount]),
FORMAT_STRING = "#,#",
VISIBLE = 1;
当我选择了仓库维度,但是我想使其动态化时,这是可行的,这样它也可以用于任何其他维度/层次结构,而无需将其添加到代码中.
This is working when I have warehouse Dimension selected but I want to make it dynamic so that it would work for any other dimensions/hierarchies as well without them being added to the code.
感谢您的帮助!
推荐答案
我认为您想使用根
CALCULATE;
CREATE MEMBER CURRENTCUBE.[Measures].[Total On Hand Amount]
AS AGGREGATE(Root(),[Measures].[On Hand Amount]),
FORMAT_STRING = "#,#",
VISIBLE = 1;
这是一个带有以下内容的小示例:
Here is a small example with:
这篇关于多个维度的总计TOTAL的计算成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!