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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

How do I locate this error: "Invalid token, Line 1, Offset4, [) )."

I can't refresh my data. I'm trying to identify where the error is occuring. How do I read what this code is telling me? I know the table. Is it telling me to look in a particular column within the table to find the error?

 

InvalidToken Error.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I saved a copy of the original excel file, then re-pointed PowerBI to the new file. I had a little bit of clean-up to do from there, but it seemed to clear up whatever the issue was. Thanks for helping me along and giving me some additional ideas to look into.

View solution in original post

7 REPLIES 7
edhans
Community Champion
Community Champion

Ahh... that could have been some random corruption in the Excel file, which is especially hard to track down. 

Please mark one or more of the posts in this thread as the solution so this thread is marked solved and other can see it. Glad your project is moving forward @Anonymous 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
edhans
Community Champion
Community Champion

typically that is referring to the M code. M and DAX natively know nothing of Excel once the data is brought in on the source and navigation lines. Then it just becomes data in the query tool or DAX model. If there were an error in the 4th column, it would either specifically reference the column name in the error, or give you something like this when you load the data.

edhans_0-1608156080997.png

Or it will do give you an invalid token with some sort of syntax error, which is what I was trying to find. Very hard to know without the actual data file. 

Go back to the table in Power Query and in the upper left, tell it to keep errors. Then look at the data that is left and see if you can find fields with errors. Report those error messages back here. 

edhans_1-1608156274828.png

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

I saved a copy of the original excel file, then re-pointed PowerBI to the new file. I had a little bit of clean-up to do from there, but it seemed to clear up whatever the issue was. Thanks for helping me along and giving me some additional ideas to look into.

edhans
Community Champion
Community Champion

I don't see a problem off the top of my head, but that is an image with a lot of obscured text, so hard to say exactly.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

Thanks for looking it over. Do you know what the "Line 1" refers to? And the "Offset 4"? Are those rows (line 1) and columns (4th column) in the excel table?

edhans
Community Champion
Community Champion

Post your M code from the Advanced Power Query editor. Use the </> code box to do so in the toolbar please.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

Is this the correct info?

AdvEditor.png

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.