cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TAUSEEF Frequent Visitor
Frequent Visitor

Expression.syntaxerror: token indetified expected

 

ERROR.png

Plz help me, how to tackle this issue that i get when i try to edit a table imported as excel content from powerpivot.

The same error shows up when i hit refresh on the table which is imported from excel file as excel content.

Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yulgu-msft Super Contributor
Super Contributor

Re: Expression.syntaxerror: token indetified expected

Hi @TAUSEEF,

 

Based on my assumption, your Power Query should be like below, please directly paste it to the Advanced Editor.

let
    Source = Teradata.Database("HODB", [Query="SELECT ""AC_RNK"".""CHART"".*   FROM ""AC_RNK"".""CHART"""]),
    #"Renamed Columns" = Table.RenameColumns(Source, {{"ACODE", "ACODE"}, {"DESCRIPTION", "DESCRIPTION"}, {"ACODE_TYPE", "ACODE_TYPE"}, {"ACTIVE", "ACTIVE"}}),    
    #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns", {{"ACODE", Int64.Type}, {"DESCRIPTION", type text}, {"ACODE_TYPE", type text}, {"ACTIVE", type text}})
   
in
    #"Changed Type"

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

10 REPLIES 10
Interkoubess Established Member
Established Member

Re: Expression.syntaxerror: token indetified expected

Hi @TAUSEEF,

 

Could you please the right side ( drag the bar on the right side) because we cannot see this part in order to find wich token is really missing.

 

Show the whole image and I can assist.

 

Ninter

zoloturu
Advisor

Re: Expression.syntaxerror: token indetified expected

@TAUSEEF,

 

Can you provide code of your M (PowerQuery) script here? Go to Advanced editor and copy it?

It will be easier to help you.

 

Regards,

Ruslan

TAUSEEF Frequent Visitor
Frequent Visitor

Re: Expression.syntaxerror: token indetified expected

Untitled.png

 

TAUSEEF Frequent Visitor
Frequent Visitor

Re: Expression.syntaxerror: token indetified expected

let
    Source = #!" let#(cr)#(lf)    Source = Teradata.Database(""HODB"", [Query=""SELECT """"AC_RNK"""".""""CHART"""".*   FROM """"AC_RNK"""".""""CHART""""""]),#(cr)#(lf)    #""Renamed Columns"" = Table.RenameColumns(Source, {{""ACODE"", ""ACODE""}, {""DESCRIPTION"", ""DESCRIPTION""}, {""ACODE_TYPE"", ""ACODE_TYPE""}, {""ACTIVE"", ""ACTIVE""}}),,#(cr)#(lf)    #""Changed Type"" = Table.TransformColumnTypes(#""Renamed Columns"", {{""ACODE"", Int64.Type}, {""DESCRIPTION"", type text}, {""ACODE_TYPE"", type text}, {""ACTIVE"", type text}})#(cr)#(lf)in#(cr)#(lf)    #""Changed Type"""
in
    Source

zoloturu
Advisor

Re: Expression.syntaxerror: token indetified expected

@TAUSEEF,

 

I see there an extra comma after text {""ACTIVE"", ""ACTIVE""}})

Please remove one.

 

Regards,

Ruslan

TAUSEEF Frequent Visitor
Frequent Visitor

Re: Expression.syntaxerror: token indetified expected

i have tried removing it {""ACTIVE"", ""ACTIVE""}}),, but the editor wont accept it. Before i removed the editor showed no syntax error.

Highlighted
zoloturu
Advisor

Re: Expression.syntaxerror: token indetified expected

@TAUSEEF,

 

Did you remove only one comma via Advanced Editor? See on the picture:

 

extra comma.PNGextra comma

Regards,

Ruslan

 

Interkoubess Established Member
Established Member

Re: Expression.syntaxerror: token indetified expected

Hi @TAUSEEF,

 

As @zoloturu explained, please remove only one comma.

 

Not both but only one.

 

Let us know if it did not work.

 

Ninter

TAUSEEF Frequent Visitor
Frequent Visitor

Re: Expression.syntaxerror: token indetified expected

Untitled.png

After doing this the error that showed earlier was convertered to token comma expected.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 337 members 4,071 guests
Please welcome our newest community members: