Forum Discussion
DATATABLE DAX is giving syntax error
I am using the below DAX:
Custom =
DATATABLE(
"Name", STRING,
"Code", INTEGER,
"ID", INTEGER,
{
{"WW AA",101,1},
{"WW BB CC",102,2}
}
)I am getting the below error, at first glance, I am not able to see any error in my code, not sure, why I am getting below error
Hi amikm
There are some non-printing characters between the { and " before the W.
If you put your cursor before the { then move it right,it takes more than 2 moves to get past the "
Same problem at the end of both lines where you are declaring the data values. I've highlighted in red where there are hidden chars that you need to delete
Delete the {" and retype these characters, same for the end of the data lines.
Regards
Phil
3 Replies
- PhilipTreacySuper User
Hi amikm
There are some non-printing characters between the { and " before the W.
If you put your cursor before the { then move it right,it takes more than 2 moves to get past the "
Same problem at the end of both lines where you are declaring the data values. I've highlighted in red where there are hidden chars that you need to delete
Delete the {" and retype these characters, same for the end of the data lines.
Regards
Phil
- amikmHelper V
Thanks PhilipTreacy for the catch, I was using Notepad++, now able to fix the issue
- PhilipTreacySuper User