基于SQL查询的Dax表达式

时间:2019-04-11 12:58:31

标签: powerbi dax powerbi-desktop

  

我正在寻找以下SQL查询的DAX表达式

SELECT sum(CA) AS CA
FROM(
SELECT 
    CATEGORIE,
    SUM(CA) AS CA
FROM ACHATS 
WHERE ANNEE = 2018
AND FOURNISSEUR = 'AKZO NOBEL'
AND INDEPENDANT = 0
GROUP BY CATEGORIE)x

到目前为止,我已经尝试过了,但是没有用。

CALCULATE (
    SUM ( ACHATS[CA] ),
    ALLEXCEPT ( ACHATS, ACHATS[CATEGORIE] ),
    ACHATS[ANNEE] = "2018",
    ACHATS[INDEPENDANT] = 0
)

0 个答案:

没有答案