我正在寻找以下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
)