Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Solved! Go to Solution.
PREVIOUSDAY happens to be the name of a DAX function. Use a different name for your variable.
Hi @Belle2015
Reserved words, such as function names, cannot be used as variable names. My typical approach is to prefix the variable name with an underscore (_), just in case a future function with the same name as an existing variable is created.
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
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
Hi @Belle2015
Reserved words, such as function names, cannot be used as variable names. My typical approach is to prefix the variable name with an underscore (_), just in case a future function with the same name as an existing variable is created.
PREVIOUSDAY happens to be the name of a DAX function. Use a different name for your variable.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
27 |
User | Count |
---|---|
92 | |
50 | |
44 | |
40 | |
35 |