Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
amikm
Helper V
Helper V

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

DAX.png

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super 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

invc.png

Delete the {" and retype these characters, same for the end of the data lines.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

3 REPLIES 3
PhilipTreacy
Super User
Super 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

invc.png

Delete the {" and retype these characters, same for the end of the data lines.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Thanks @PhilipTreacy  for the catch, I was using Notepad++, now able to fix the issue

@amikm 

Try VS Code

Visual Studio Code - Code Editing. Redefined

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.