Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AmiraBedh
Resident Rockstar
Resident Rockstar

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.


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
1 ACCEPTED SOLUTION
amirabedhiafi
Impactful Individual
Impactful Individual

You need SUMX iterator function.KPI1 :=SUM(

SUMX('Table', [DPPMTPART] *
   ([PROP_MtDemandeFin] -([PFIINVESTISSEMENT] - ([ENVMTINITIAL]-[VSTD_ENVMTDISPO]))))
Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini

View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

@AmiraBedh 

 

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!!

 

amirabedhiafi
Impactful Individual
Impactful Individual

You need SUMX iterator function.KPI1 :=SUM(

SUMX('Table', [DPPMTPART] *
   ([PROP_MtDemandeFin] -([PFIINVESTISSEMENT] - ([ENVMTINITIAL]-[VSTD_ENVMTDISPO]))))
Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.