The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
83 | |
83 | |
37 | |
34 | |
32 |
User | Count |
---|---|
92 | |
79 | |
62 | |
53 | |
51 |