Ssas 子嗣总数

Ssas 子嗣总数,ssas,business-intelligence,tabular,dax,Ssas,Business Intelligence,Tabular,Dax,我正在研究SSAS 2012表格模型,其中一项指标遇到了一些困难。 我的设置是什么样子的: Dim Time hierarchy: Year - Season (Quarter) - Month Fact Forecast: Account - Material - Month - Forecast Quantity - Bookings Quantity 我现在需要计算预测准确度,但范围限于所示期间。 在月级别上,这是通过执行以下操作来实现的: Forecast Accuracy:=1-

我正在研究SSAS 2012表格模型,其中一项指标遇到了一些困难。 我的设置是什么样子的:

Dim Time hierarchy: Year - Season (Quarter) - Month

Fact Forecast: Account - Material - Month - Forecast Quantity - Bookings Quantity
我现在需要计算预测准确度,但范围限于所示期间。 在月级别上,这是通过执行以下操作来实现的:

Forecast Accuracy:=1- (SUMX('Forecast',ABS(Forecast Quantity - Bookings Quantity))/Forecast Quantity)
我的问题是从更高的谷物开始的,比如季节或年份。 这里最大的问题是这一部分:

ABS(Forecast Quantity - Bookings Quantity)
这两个数量应该首先汇总到帐户-物料-级别,然后相互减去,但我无法让它起作用

以前有没有人遇到过这样的问题,因为我在网上爬了半天之后,不知道如何解决这个问题……

Gerhard Brueckl回答:

Forecast Error:=
    SUMX(
        SUMMARIZE(
            'Fact Forecast',
            'Fact Forecast'[Account],
            'Fact Forecast'[Material]),
        CALCULATE (
            ABS (
                SUM ( [Forecast Qty] ) - SUM ( [Bkgs Qty])
            )
        )
    )