Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi, I had a little question may be one of you had the same issue. I tried to use the Cognitive Services for PBI Text Analytics. I create a cognitive Service on azure and create a funktion in PBI. But then a error occure - I get the mesage: "Web.Contents failed to get contents from 'https://powerbianalyticstext.cognitiveservices.azure.com/' (404):". So May be one of you had an idea how to handle this issue.
I tried also to finde the "Ocp-Apim-Subscription-Key" - but I failed, If this is the missing link may be someone can help me to finde it :)?
The code for the fuction:
= (text) => let apikey = " Insert your API Key here ", endpoint = " Insert your Endpoint here ", jsontext = Text.FromBinary(Json.FromValue(Text.Start(Text.Trim(text), 5000))), jsonbody = "{ documents: [ { language: ""en"", id: ""0"", text: " & jsontext & " } ] }", bytesbody = Text.ToBinary(jsonbody), headers = [#"Ocp-Apim-Subscription-Key" = apikey], bytesresp = Web.Contents(endpoint, [Headers=headers, Content=bytesbody]), jsonresp = Json.Document(bytesresp), sentiment = jsonresp[documents]{0}[score] in sentiment
Best,
Kathrin
Solved! Go to Solution.
Solved the problem by myself 😄 wasn't so easy but it works. Problem was the wrong Endpoint which MSFT wrote in the endpoint row. The right one can be find under point 2 (Api console).
HI,
I am facing same issue.But unable to understand what needs to be fixed in Endpoint line of power query. Can you please share the correct code you used & worked out?
Also what is "right one can be find under point 2(Api Console)"??
Hi @KBO ,
Could you please try to post this request using other tools to verify if the endpoint and api key are valid? The sent endponint is similar like "https://<your-custom-subdomain>.cognitiveservices.azure.com" & "/text/analytics/v2.1/sentiment" based on this document: https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/tutorials/tutorial-power-bi...
Best regards,
Solved the problem by myself 😄 wasn't so easy but it works. Problem was the wrong Endpoint which MSFT wrote in the endpoint row. The right one can be find under point 2 (Api console).
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
6 | |
6 | |
6 | |
6 |
User | Count |
---|---|
9 | |
9 | |
8 | |
6 | |
6 |