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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Super User
Super User

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
Super User
Super User

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
Super User
Super User

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
Super User
Super User

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors