Forum Discussion
Belle2015
1 year agoHelper II
Help with 'the syntax for 'PreviousDay' is incorrect' error
I am trying to use a measure to filter to show the previous day's data or the weekend's data on a Monday but I am getting the below error? Any help would be greatly appreciated.
- 1 year ago
PREVIOUSDAY happens to be the name of a DAX function. Use a different name for your variable.
- 1 year ago
Hello Belle2015 ,
PREVIOUSDAY is a DAX function and reserverd keyword in DAX. As per guideline we can not use existing reserved word or functions anywhere in dax code hence you see this error. Replace this variable with other names like VAR_PREVIOUS_DAY or _PREVIOUSDAY and run your code again.
I hope this answers your query.
Warm Regards,
Neeraj Kumar
lbendlin
1 year agoSuper User
PREVIOUSDAY happens to be the name of a DAX function. Use a different name for your variable.