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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
tross4012
Helper I
Helper I

Syntax Issues with API Call

Can anyone identify what is wrong with this function?

tross4012_0-1650473044655.png

 

 

I know a "Token Comma Expected" however, I cannot figure out to fix this problem. The bolded/underlined phrases below are whats giving me this problem:

 

Source = Csv.Document(Web.Contents("https://ClinicalTrials.gov/api/query/study_fields?&fields=NCTId,LeadSponsorName,Phase,BriefTitle,Org...max_rnk=" & Number.ToText( limit )"&fmt=csv&min_rnk=" & Number.ToText( offset )),[Delimiter=",", Columns=7, Encoding=65001, QuoteStyle=QuoteStyle.None]),

1 ACCEPTED SOLUTION
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

@tross4012 - I think you resolved this.  But there is an & missing after  Number.ToText( limit )

View solution in original post

1 REPLY 1
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

@tross4012 - I think you resolved this.  But there is an & missing after  Number.ToText( limit )

Helpful resources

Announcements
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.