cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gkakun Regular Visitor
Regular Visitor

Power BI with Azure text analysis

Hi all,

 

I'm trying to use the keyphrase service in Azure, I used the API key from Azure and used anonymous credentials after I got few errors.

now, this is the error I'm getting, and have no idea how to solve this. 

I have tried all the options and get the same feedback

 

 

 Capture.JPG

5 REPLIES 5
Highlighted
gkakun Regular Visitor
Regular Visitor

Re: Power BI with Azure text analysis

This is the code I am using 

 

(text) => let
apikey = "fd8e13fb24384e5fa9b2106fa5c7ab9d",
endpoint = "https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/keyPhrases",
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),
keyphrases = Text.Lower(Text.Combine(jsonresp[documents]{0}[keyPhrases], ", "))
in keyphrases

Community Support Team
Community Support Team

Re: Power BI with Azure text analysis

Hi @gkakun

As tested with your code in Query editor, I will see a query like this, but can't see any dataset imported.

8.png

 

Also, when i click on the URL, it go to a page with error.

9.png

 

Please check if your URL is wrong, and if your account for Power BI Desktop is the same with Azure text analysis'.

Additionally, you could check this article to see if you have applied wrong steps.

 

Best Regards

Maggie

 

 

gkakun Regular Visitor
Regular Visitor

Re: Power BI with Azure text analysis

Hi Maggie, 

 

I have dataset connected, I didnt mentioned it since I dont think it's the problem.

 

About the URL, this is the URL I need to add since it's the one I have got from the Azure workspace.

 

see attached  (end point)

 

Capture.JPG

 

gkakun Regular Visitor
Regular Visitor

Re: Power BI with Azure text analysis

And about the article, I just reviewed it, and looks like I did exactly the same. I can't see in the article any reference to the credentials. I think this is the problem I just couldn't find any way to solve this.  

gkakun Regular Visitor
Regular Visitor

Re: Power BI with Azure text analysis

Hi Maggie,

 

I have managed to solve the problem in the query editor, and i can see the column I created from the functions. when i apply the changes I get this error- any idea why?Capture.JPG

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 40 members 927 guests
Please welcome our newest community members: