cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ashwani_pal Regular Visitor
Regular Visitor

SUMX Function

Hi, 

 

I am using Sumx Function  to calculate selective data in Power BI report using SUMX as a query in  adding custom column. But It is showing error "Expression.Error: The name 'SUMX' wasn't recognized.  Make sure it's spelled correctly". What is needed to be done in such case.

 

Thanks

 

Regards

Ashwani

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
v-jiascu-msft Super Contributor
Super Contributor

Re: SUMX Function

Hi @ashwani_pal,

 

Seems you were using a DAX function in the Query Editor that only accepts Power Query formula language (M language) and R. Please try it out in the Data pane.

SUMX_Function

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
7 REPLIES 7
Ross73312 Super Contributor
Super Contributor

Re: SUMX Function

Can you provide some more information, such as the a brief description of the dataset and the formula you are trying to write?  I'm expecting you are using SUMX in the wrong context.


   

              Did I answer your question? Mark my post as a solution!
       

Proud to be a Datanaut!


   


ashwani_pal Regular Visitor
Regular Visitor

Re: SUMX Function

Thanks for quick reply,

I need to filter columns from 2 different tables by compairing there values and whichever rows are remaining after filtering, i need to aplly mathematical operation (summation.) Query i am using is : 

 

 

sumx(filter("ERTTReports_RuntimeLifetime_SHIFT", "ERTTReports_RuntimeLifetime_SHIFT.Asset" = [Asset], AND
( "ERTTReports_RuntimeLifetime_SHIFT.StartTime" >=[Time],"ERTTReports_RuntimeLifetime_SHIFT.StartTime" <=[Next Time]),
("ERTTReports_RuntimeLifetime_SHIFT.EndTime">=[Time]and "ERTTReports_RuntimeLifetime_SHIFT.EndTime"<=[Next Time])),
"ERTTReports_RuntimeLifetime_SHIFT.Duration")

 

Regards

Ashwani

Ross73312 Super Contributor
Super Contributor

Re: SUMX Function

Sounds like the issue is trying to get dax to do everything in a single statement and over complicating the problem.

 

Firstly, are you able to join your two tables via the Asset column?  If not, are you able to create a Unique Asset list (can be done within Power Query) that you can link both tables to instead?  Once you get your data structure right, we can create a set of dax statements to break your formula into chunks and have Power BI run them appropriately.


   

              Did I answer your question? Mark my post as a solution!
       

Proud to be a Datanaut!


   


Super User
Super User

Re: SUMX Function

Hi,

 

Share some data and show the expected result.

Highlighted
v-jiascu-msft Super Contributor
Super Contributor

Re: SUMX Function

Hi @ashwani_pal,

 

Seems you were using a DAX function in the Query Editor that only accepts Power Query formula language (M language) and R. Please try it out in the Data pane.

SUMX_Function

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft Super Contributor
Super Contributor

Re: SUMX Function

Hi @ashwani_pal,

 

Could you please mark the proper answer as solution?

 

Best Regards!
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ashwani_pal Regular Visitor
Regular Visitor

Re: SUMX Function

Thanks everyone for guiding. 

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 35 members 1,054 guests
Please welcome our newest community members: