Forum Discussion
AmiraBedh
4 years agoSuper User
The SUM function only accepts a column reference as an argument.
SUM((PFIINVESTISSEMENT -
(ENVMTINITIAL-VSTD_ENVMTDISPO))*DPPMTPART)
When I try to apply it in DAX :
KPI1 :=SUM(
DPPMTPART *
([PROP_MtDemandeFin] -(PFIINVESTISSEMENT -
(ENVMTINITIAL-VSTD_ENVMTDISPO) )
)
I have this error :
The SUM function only accepts a column reference as an argument.
You need SUMX iterator function.KPI1 :=SUM(
SUMX('Table', [DPPMTPART] * ([PROP_MtDemandeFin] -([PFIINVESTISSEMENT] - ([ENVMTINITIAL]-[VSTD_ENVMTDISPO]))))
2 Replies
- amirabedhiafiImpactful Individual
You need SUMX iterator function.KPI1 :=SUM(
SUMX('Table', [DPPMTPART] * ([PROP_MtDemandeFin] -([PFIINVESTISSEMENT] - ([ENVMTINITIAL]-[VSTD_ENVMTDISPO])))) - VahidDMSuper User
Yes, SUM just Adds all the numbers in a column.
See this link:
https://docs.microsoft.com/en-us/dax/sum-function-dax
You can use SUMX.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!