如何将 Tableau FIXED LOD 转换为 Power BI?

时间:2021-01-22 20:45:06

标签: powerbi dax

我有一个具有多个维度的固定 LOD,如下所示:

{ FIXED [Customer ID], [Quarter], [Product Type] : SUM([Sales]) }

在 Power BI 中,我使用 this article 中给出的示例编写如下:

CALCULATE(
    SUM('Table'[Sales]), 
    ALLEXCEPT('Table', 'Table'[Customer ID]),
    ALLEXCEPT('Table', 'Table'[Quarter]),
    ALLEXCEPT('Table', 'Table'[Product Type])
)

但是它没有按预期工作,你能帮我理解正确的做法吗?

1 个答案:

答案 0 :(得分:0)

我通过编辑我的原始表达式找到了答案,以下内容按预期工作:

CALCULATE(
    SUM('Table'[Sales]), 
    ALLEXCEPT('Table', 'Table'[Customer ID], 'Table'[Quarter], 'Table'[Product Type])
)