Forum Discussion
Invalid Token: Measure in PowerBI
- 4 years ago
Hi Anonymous ,
This error message is an indication that there is a problem with your syntax. I found an extra "]" in your code, please remove it and run it again.
Also, you can format the DAX in this URL https://www.daxformatter.com/ to make it more beautiful.
upcoming Assessments Complete = CALCULATE ( DISTINCTCOUNT ( ASSESSMENT_TASKS[MEMBER_NBR] ), OR ( ASSESSMENT_TASKS[ASSESSMENT_STATUS] = "Assessed late", ASSESSMENT_TASKS[ASSESSMENT_STATUS] = "Assessed on time" ), OR ( ASSESSMENT_TASKS[DAYS UNTIL DUE] = "14 DAYS OR LESS", ASSESSMENT_TASKS[Days Until Due] = "15 TO 45 DAYS" ) ) / CALCULATE ( DISTINCTCOUNT ( ASSESSMENT_TASKS[MEMBER_NBR] ), OR ( ASSESSMENT_TASKS[DAYS UNTIL DUE] = "14 DAYS OR LESS", ASSESSMENT_TASKS[Days Until Due] = "15 TO 45 DAYS" ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , try removing all the line breaks in the measure and put it all in one line. If the DAX editor does force a line-break, make sure it doesn't line-break in the middle of a tablename or fieldname.