SUMX not working, Expression Error

Good day,

I encountered an error saying, “Expression.Error: The name ‘SUMX’ wasn’t recognized. Make sure it’s spelled correctly”, when I used SUMX to calculate selected data in a Power BI report. I used SUMX as a query in adding custom column:

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") 

I don’t know what to do in this case. Any suggestions to resolve this? Thank you.

Ok I can quickly tell the big issue here.

You shouldn’t and can’t use DAX functions inside the query editor. You should be using these inside of the front end of Power BI.

That area only accepts Power Query functions which is a whole different beast.

Definitely start working through all the content at Enterprise DNA Online here. It seems there is some initial fundamental concepts that you need to get your head around.

Start here

Then you’ve got plenty of things to move to from here.

Check out this post here around some recommended orders for courses.