使用ALL或ALLEXCEPT的结果不同 [英] Different results using ALL or ALLEXCEPT

查看:129
本文介绍了使用ALL或ALLEXCEPT的结果不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下措施:

Weighted Score = 
SUMX (
    'Fact_Customer_parameter_Scores',
    Fact_Customer_parameter_Scores[Scores] * Fact_Customer_parameter_Scores[Parameter_Weight]
        / CALCULATE (
            SUM ( Fact_Customer_parameter_Scores[Parameter_Weight] ),
            ALLSELECTED ( Dim_Parameters ),
            ALLEXCEPT (
        'Fact_Customer_parameter_Scores',
        'Fact_Customer_parameter_Scores'[Customer],
        'Fact_Customer_parameter_Scores'[Date]
    )
        )
)

我尝试用ALL替换ALLEXCEPT部分,以便对某些属性进行过滤,出于某种原因,我得到不同的度量结果。

I tried replacing the ALLEXCEPT section with ALL in order to enable filtering on some of the attributes and for some reason i get different measure results.

然后新措施是:

Weighted Score using all =
SUMX (
    'Fact_Customer_parameter_Scores',
    Fact_Customer_parameter_Scores[Scores] * Fact_Customer_parameter_Scores[Parameter_Weight]
        / CALCULATE (
            SUM ( Fact_Customer_parameter_Scores[Parameter_Weight] ),
            ALLSELECTED ( Dim_Parameters ),
            ALL (
                'Fact_Customer_parameter_Scores'[Scores],
                'Fact_Customer_parameter_Scores'[Parameter_Weight],
                'Fact_Customer_parameter_Scores'[Parameter]
            )
        )
)

以下是所有事实领域和措施:

These are all the fact fields and measures:

结果不同:

任何想法

谢谢!

推荐答案

ALLEXCEPT参数清除表中除所指定的两列之外的所有列的过滤器,而ALL语法仅清除列出的三列中的过滤器。因此,两个CALCULATE可能会使不同的行集合起作用,具体取决于最初应用于报告中的过滤外的
列(然后根据ALL / ALLEXCEPT的规范清除或不清除)。
The ALLEXCEPT parameter clears filters from all columns in the table except the two specified, while the ALL syntax clears filters from just the three listed columns. Thus the two CALCULATEs may get different sets of rows to work over, depending on which columns outside filtering in the report is initially applied to (and then either cleared or not per specifications of ALL/ALLEXCEPT).


这篇关于使用ALL或ALLEXCEPT的结果不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆