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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
berezinskiy-p
New Member

Expression.SyntaxError: Token Eof expected. and Token Comma expected

Please, help, i can't understand my falt

Error in editor - Expression.SyntaxError: Token Eof expected.

Error in update - Token Comma expected

 

 

 

 

= Let (page as number) as table => 
Let yesterday = Date.ToText(Date.AddDays(DateTime.Date(DateTime.LocalNow()),-1),"yyyy-MM-dd"),
Source = Json.Document(Web.Contents("URL/api/v4/orders?filter[createdAtTo]="&yesterday&"&page=" & Number.ToText(page) & "&limit=100&apiKey=TOKEN")), orders = Source[orders], 
#"Converted to Table" = Table.FromList(orders, Splitter.SplitByNothing(), null, null, ExtraValues.Error) 
in 
#"Converted to Table"

 

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Power Query is case sensitive.  Instead of "Let" use "let"

You can simplify "yesterday"

yesterday = DateTime.ToText(DateTime.LocalNow()-#duration(1,0,0,0),"yyyy-MM-dd")

 

View solution in original post

6 REPLIES 6
Bridgetter
New Member

I am recieving  "Expression.SyntaxError: Token ',' expected" for expression

IF(AND([Team]="Johnson", "Ohio") THEN, "Maryland" else [Field Office]))). I cannot clear up my error. (first says IF is spelled incorrectly now I cant get past the Syntax error) Thanks

@Bridgetter please open a new thread.

lbendlin
Super User
Super User

Power Query is case sensitive.  Instead of "Let" use "let"

You can simplify "yesterday"

yesterday = DateTime.ToText(DateTime.LocalNow()-#duration(1,0,0,0),"yyyy-MM-dd")

 

https://skr.sh/sCxle6hYoo0

now it shows that i have error with comma and "Expression.SyntaxError: Token Eof expected." (((

you need to put "let"  before "yesterday" 

Thank you, it works! Ihha!

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors