Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Dear all,
I'm trying to use Text Analysis Cognitive Services in Power BI Desktop, but I'm having this error since a long time, and I have tried some solutions but it did'n works.
Formula.Firewall: Query 'Coulmn' (step 'Invoked Custom Function') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.
I were following the steps excatly as it's listed in this tutorial link:
and I've visited Ken Puls blogg as it solved a similar problem posted by a regular visitor.
but it's not the same problem I have since my code does't contain a 'source' :
// Returns key phrases from the text in a comma-separated list
(text) => let
apikey = "API_KEY",
endpoint = "https://<custom-subdomain>.cognitiveservices.azure.com/text/analytics" & "/v2.1/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
Any Suggestions please!
Hi @Heyam ,
To be honest, I just know a few about this. If you are a pro user, I suggest you to create a support ticket to get further help.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Icey ,
Unfortunately, I'm not a pro user.
So, should I just give up on finding a solution to my issue!
Hi @Heyam ,
Sorry didn't help you solve the problem. Hope these super users could help you:
@Greg_Deckler ; @MFelix ; @amitchandak ; @parry2k .
Best Regards,
Icey
@Heyam seems like your firewall issue is resolved? correct? Do you any error when you preview in power query?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @Heyam ,
Please try this:
If this doesn't work, please try to create a custom column as fixed Text and try it again.
let
text = [comment]
apikey = "API_KEY",
endpoint = "https://<custom-subdomain>.cognitiveservices.azure.com/text/analytics" & "/v2.1/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
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you @Icey , your second suggestion worked with well, but it turn an error when apply it.
Please notice that I'm working on 20,000 records (rows), and planning to implement the query on 130,000 records later on.
Is it a problem? while I'm calling API version v2.1 endpoint from the code, v2.1 has no maximum limit !
And if I copied the Endpoint as it's in Azure portal, it doesn't contain the location like http://westus.domain.
Regards,
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
89 | |
52 | |
45 | |
39 | |
38 |