使用AND语句Q的Power BI SUMX()

时间:2018-09-24 13:55:24

标签: powerbi dax

如何在我的SUMX()语句中添加AND?我当前的代码是:

Enquiry Excluded Amt = 
SUMX (
    FILTER ( _enquiries, _enquiries[_GUID] = _2018_Budget[_GUID] ),
    _enquiries[Amount (Enq)]
)

但是我想将AND语句添加到SUMX()

Enquiry Excluded Amt = 
SUMX (
    FILTER ( _enquiries, _enquiries[_GUID] = _2018_Budget[_GUID] ),
    _enquiries[Amount (Enq)] AND _enquiries[Excluded] = TRUE()
)

以上操作无效。

1 个答案:

答案 0 :(得分:2)

语法&&允许在过滤器中组合条件。像这样:

Enquiry Excluded Amt = 
SUMX (
    FILTER ( _enquiries,
        _enquiries[_GUID] = _2018_Budget[_GUID] && _enquiries[Excluded] = TRUE()
    ),
    _enquiries[Amount (Enq)]
)