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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Power Query error

Greetings,

 

I had a REST URL working, but had a problem with the table. I did not keep a copy.

There is no syntax errors, but the new code is failing??

 

let
    cfaURL = url,
    cfatoken = token,
    
    SourceURL = Json.Document(Web.Contents(cfaURL+cfatoken, [Headers [#"Authorization"=cfatoken]])),
    toTable = Table.FromRecords({SourceURL})
    
in
    SourceURL

 

The error is (Left = URL + Right = token)

Expression.Error: We cannot apply operator + to types Text and Text.
Details:
Operator=+

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Anonymous 

That error is from trying to join cfaURL and cfaToken using a +

To join text use &

e.g.

 

 

SourceURL = Json.Document(Web.Contents(cfaURL & cfatoken, [Headers = [#"Authorization"=cfatoken]])),

 

Note: Headers was also missing an = after it, which I've corrected in the code above.

 

Phil 


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @Anonymous 

That error is from trying to join cfaURL and cfaToken using a +

To join text use &

e.g.

 

 

SourceURL = Json.Document(Web.Contents(cfaURL & cfatoken, [Headers = [#"Authorization"=cfatoken]])),

 

Note: Headers was also missing an = after it, which I've corrected in the code above.

 

Phil 


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors
Top Kudoed Authors