Reputation: 1150
I am learning to use DAX Studio to test out my DAX scripts,
DAX Studio says my script is wrong, but I am not sure what exactly is the problem
CummulativeWeek =
CALCULATE (
SUM ( Data[Value] ),
FILTER ( ALL ( Data[Week] ), Data[Week] <= MAX ( Data[Week] ) ),
FILTER ( ALL ( Data[Year] ), Data[Year] == MAX ( Data[Year] ) )
)
I don't see what I am doing wrong. I checked the docummentation, YouTube vids, everything seems to be fine.
In PowerBI the command is executed just fine.
Is there a setting in DAX Studio that I am missing?
Upvotes: 1
Views: 1241
Reputation: 30174
Are you using the EVALUATE keyword?
Also, you need to return a table.
Have a read here: https://daxstudio.org/docs/tutorials/writing-dax-queries/
Upvotes: 1