Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I get a Token Eof expected error whenever I try to enter a let expression in the advanced editor.
I have also tried pasting in the Hello World example expression, which also gives the same error.
I have uninstalled and reinstalled the desktop app and tested with a new blank PBIX file - same problem.
Any suggestions to what the problem might be?
Hi @CJDK ,
Whether the problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help other members in the community find the solution easily if they face the similar problem with you. Thank you.
Best Regards
Rena
@ImkeF , can you help with this.
@CJDK , I am hoping you are on latest power bi version
Yes, I have downloaded and reinstalled today!
BTW tested also on another PC and same result.
Hi @CJDK ,
Token EoF expected error usually occurs when an invalid function name is used, or it uses the wrong case. You can refer the following documentations to create M query.
Power Query M formula language
Basics of M: Power Query Formula Language
Best Regards
Rena
Thanks @v-yiruan-msft - the expression being entered is "let" - 100% correct - please note screenshot.
Hi @CJDK ,
Could you please try to paste the following codes in Advanced Editor and check if there is any syntax error in your side?
let
Source = ""
in
Source
Best Regards
Rena
Hi @CJDK ,
It is strange... Besides the codes which I shared with you, is there any other codes in your Advanced Editor? As checked your screenshot, the code start from line 11... By the way, what's the version of your Power BI Desktop? It is an app from Microsoft store or installation package version?
Best Regards
Rena
Version: 2.85.681.0 64-bit (September 2020) - it is a downloaded version
Your code example works fine if I delete the preceding code. But the preceding code seems to be OK:
Hi @CJDK ,
Whether you put the preceding code and my codes in Advance Editor at the same time(just like below screenshot)? If yes, then it will get syntax error...
Each query is composed of variables, expressions, and values encapsulated by a let expression. A let expression is made up of a let statement and an in statement, as shown in the following syntax:
let
Variablename = expression,
#"Variable name" = expression2
in
Variablename
If you just want to add new steps in advanced editor, first use commas to separate them and apply the variable from the previous step to define the logic in the new step.You can refer the following documentation for more details:
Power Query M Formula Language in Power BI Desktop
Power Query M formula language
Best Regards
Rena
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |