Power BI + Azure Cognitive Services: Harnessing Text Analytics and Vision in Your Dashboards

Anna
PMO Specialist at Multishoring

Main Problems

  • What Is Possible with Power BI + Azure Cognitive Services?
  • Enriching Dashboards with Vision/Cognitive Image Analysis
  • Designing AI-Driven Dashboards for Maximum Insight
  • our Next Steps in AI-Driven BI

Most businesses are sitting on a goldmine of untapped information. This isn’t the clean, organized data you find in spreadsheets and databases; this is the messy, unstructured data that makes up the vast majority of an organization’s information assets. In fact, analysts estimate that as much as 80% of all enterprise data is unstructured. This includes a wide array of content, from customer emails and social media comments to product images and support call transcripts. While this information is rich with potential insights, its lack of a clear format makes it difficult for standard business intelligence tools to analyze effectively.

This is the specific challenge that the powerful combination of Power BI and Azure Cognitive Services is designed to solve. Power BI is a leading platform for creating clear, interactive dashboards from structured data. Azure Cognitive Services provides a suite of artificial intelligence APIs capable of interpreting and understanding unstructured content like text and images. The synergy between them is what creates a strategic advantage. By integrating Azure Cognitive Services into your Power BI workflow, you can transform raw, qualitative information into quantifiable insights. For example, you can analyze thousands of customer reviews to extract key phrases and measure sentiment, then visualize these trends directly on a dashboard. This allows you to gain a much deeper and more complete understanding of your business, customers, and market.

What is this article all about?

In this article, you will learn exactly how to leverage this integration to analyze your text and image data. We will cover the practical applications, from sentiment analysis of customer feedback to object detection in images. You will get a clear, step-by-step guide on how these technologies work together, enabling you to build more sophisticated and insightful dashboards. Ultimately, you will be equipped to make smarter, data-driven decisions that can give your business a competitive edge.

What Is Possible with Power BI + Azure Cognitive Services?

Before diving into the technical “how-to,” it’s essential to understand what this integration makes possible and the core components involved. This section breaks down the fundamentals of combining Power BI with Azure’s AI capabilities.

Ready to Add AI to Your Power BI Dashboards?

We specialize in integrating Azure Cognitive Services with Power BI to analyze unstructured data. Let our experts build the custom solutions you need to unlock sentiment, key phrases, and image insights.

EXPLORE AI INTEGRATION

Unlock the full potential of your data.

Anna - PMO Specialist
Anna PMO Specialist

Unlock the full potential of your data.

EXPLORE AI INTEGRATION
Anna - PMO Specialist
Anna PMO Specialist

What are Azure Cognitive Services and How Do They Extend Power BI?

Azure Cognitive Services are a collection of pre-trained artificial intelligence (AI) models that are accessible through APIs. Think of them as ready-to-use AI services that you don’t need to build or train from scratch. They are designed to see, hear, speak, understand, and interpret user needs through natural methods of communication.

Power BI, on its own, is a powerhouse for analyzing structured data – information that fits neatly into rows and columns, like sales figures or inventory levels. However, its native capabilities for interpreting unstructured text or images are limited.

This is where the integration becomes a game-changer. By connecting to Azure Cognitive Services, you can send your unstructured data from Power BI to Azure’s AI models for analysis. Azure then returns a structured output that Power BI can easily understand and visualize. In short, Azure Cognitive Services act as an intelligent bridge, transforming messy, qualitative data into clean, quantitative insights that can be displayed directly in your dashboards.

What AI Functionalities Can You Integrate into Power BI Dashboards?

The integration primarily focuses on two key areas of AI: understanding text and analyzing images. These capabilities allow you to answer complex business questions that were previously out of reach for standard BI.

Here are the primary functionalities you can leverage:

  • Text Analytics:
    • Sentiment Analysis: Automatically determines whether a piece of text is positive, negative, or neutral. This is perfect for analyzing customer reviews, survey responses, or social media mentions at scale.
    • Key Phrase Extraction: Identifies and extracts the main talking points or topics from a block of text. This helps you quickly summarize what customers are discussing in support tickets or product feedback.
    • Language Detection: Identifies the language of the text. This is crucial for global businesses that need to route feedback or segment data by language.
  • Vision (Image Analysis):
    • Image Tagging: Generates a list of relevant tags or labels for an image. For example, it can identify objects, living beings, scenery, and actions within a picture, allowing you to categorize large image libraries automatically.
    • Object Detection: Not only identifies objects in an image but also provides the specific location of each object with coordinates. This can be used for inventory management from photos or analyzing in-store product placement.

How Can You Integrate Azure Cognitive Services with Power BI?

There are a few primary methods for connecting Power BI to Azure Cognitive Services, each with its own advantages depending on your technical comfort level and business requirements.

Integration MethodBest ForComplexityKey Requirement
Built-in AI Insights in Power QueryQuick tests and simple analysis on smaller datasets.LowPower BI Premium Per User (PPU) or Premium capacity.
Power BI DataflowsLarger, reusable datasets and scheduled refreshes.MediumPower BI Premium Per User (PPU) or Premium capacity.
Custom API Integration (M or Python)Maximum flexibility, custom logic, and real-time analysis.HighBasic coding knowledge (Power Query M or Python).

What Do You Need to Get Started? (Setup and Licensing)

To begin, you will need to have a few accounts and services set up. Here is a quick checklist of the prerequisites:

  • An active Azure Subscription: This is necessary to create and manage your Cognitive Services resources.
  • A Cognitive Services Resource in Azure: You will need to create a specific resource (e.g., “Language” or “Computer Vision”) in the Azure portal. This will provide you with the necessary API key and endpoint URL for authentication.
  • Power BI Desktop: The free application for creating Power BI reports.
  • A Power BI Pro or Premium Per User (PPU) License: While Power BI Desktop is free, you will need a Pro license to publish and share reports. For leveraging the more streamlined Dataflows and built-in AI Insights, a Power BI Premium (Per User or per capacity) license is required.

Important Update: The 2025 Retirement of Built-in Cognitive Services

It is crucial to be aware of a significant upcoming change. Microsoft has announced the retirement of the built-in Text Analytics and Vision functions within Power Query, effective September 2025.

This does not mean the integration is going away; rather, it is shifting towards a more standardized and flexible approach. Instead of using the simplified, built-in buttons, users will be encouraged to connect to Azure Cognitive Services by directly calling the APIs. This is typically done by creating custom functions in Power Query’s M language. While this requires a few more steps, it offers greater control, access to the latest AI models, and more transparent management of your API usage.

A Practical Guide to Integrating Text Analytics

Turning raw text from sources like customer reviews, support tickets, and surveys into structured, analyzable data is one of the most valuable capabilities you can add to your BI toolkit. This section provides a step-by-step guide on how to connect Power BI to the Azure Cognitive Service for Language to perform powerful text analytics.

Connecting Power BI to the Azure Language Service

As mentioned, the most flexible and future-proof method for this integration is to call the Language Service API directly from Power Query. This gives you full control over the process and ensures your reports will continue to work seamlessly after the built-in functions are retired.

To get started, you’ll first need a couple of key pieces of information from your Azure account:

  • Your API Key: A unique access key to authenticate your requests.
  • Your Endpoint URL: The specific web address for your Language Service resource.

You can find both of these in the “Keys and Endpoint” section of your Language resource in the Azure portal.

Step-by-Step: Setting Up Your Text Analytics Connection in Power Query

The core of this process involves creating a custom function in Power Query. This function will take a piece of text as input, send it to the Azure API, and return the structured result (like a sentiment score or a list of key phrases).

Here is a simplified, step-by-step walkthrough:

  1. Create a Blank Query: In the Power Query Editor, right-click in the Queries pane and select New Query > Blank Query. Rename this query to something descriptive, like fxAnalyzeSentiment.
  2. Open the Advanced Editor: With the new blank query selected, click on the Advanced Editor button in the Home tab.
  3. Insert the M Code: Paste the following M code into the Advanced Editor. This code defines a function that calls the sentiment analysis endpoint. Remember to replace 

(text as text) =>

let

    apiKey = “YOUR_API_KEY”,

    endpoint = “YOUR_ENDPOINT_URL/language/:analyze-text?api-version=2023-04-01”,

    jsonBody = Text.FromBinary(Json.FromValue([

        kind = “SentimentAnalysis”,

        analysisInput = [

            documents = {

                [id = “1”, language = “en”, text = text]

            }

        ]

    ])),

    requestHeaders = [

        #”Ocp-Apim-Subscription-Key” = apiKey,

        #”Content-Type” = “application/json”

    ],

    apiResponse = Web.Contents(endpoint, [

        Headers = requestHeaders,

        Content = Text.ToBinary(jsonBody)

    ]),

    jsonResponse = Json.Document(apiResponse),

    sentiment = jsonResponse[results][documents]{0}[sentiment]

in

sentiment

  1. Invoke the Custom Function: After saving the function, navigate to the table containing the text you want to analyze (e.g., a “Customer Comments” column). Go to the Add Column tab and click Invoke Custom Function.
  2. Configure and Run: In the pop-up window, give your new column a name (e.g., “Sentiment”), select your custom function (fxAnalyzeSentiment), and choose the column with your text data as the input. Click OK.

Power Query will now send the text from each row of your selected column to the Azure API and populate the new “Sentiment” column with the results (e.g., “positive,” “negative,” or “neutral”). You can follow a similar process for Key Phrase Extraction by modifying the kind parameter in the M code to “KeyPhraseExtraction” and adjusting the final line to extract keyPhrases.

Applying Text Analytics: Common Business Scenarios

Connecting the technology to business value is what makes this integration so powerful. Here are a few practical scenarios:

  • Sentiment Analysis: Gauging Customer Opinion at Scale
    • Business Problem: A marketing team needs to understand customer reactions to a new product launch based on thousands of social media mentions and online reviews.
    • Solution: By running sentiment analysis on this data in Power BI, they can create a dashboard that visualizes the percentage of positive, negative, and neutral comments over time. This helps them quickly identify if the launch was a success and spot any emerging issues without manually reading every comment.
  • Key Phrase Extraction: Identifying Core Topics and Trends
    • Business Problem: A customer support manager wants to know the most common issues customers are facing without having to sift through thousands of support tickets.
    • Solution: Using key phrase extraction, the manager can identify recurring topics like “late delivery,” “password reset,” or “product damage.” Visualizing these key phrases in a word cloud or bar chart in Power BI instantly reveals the top support drivers, allowing the team to prioritize resources and create targeted solutions.

Troubleshooting Common Integration Issues

While the process is generally straightforward, you might encounter a few common hurdles. Here’s how to address them:

  • Authentication Errors: If you get a credential-related error, the first step is to double-check your API key and endpoint URL. A simple copy-paste error is the most common culprit. Ensure there are no extra spaces or missing characters.
  • Data Refresh Failures in the Power BI Service: A report that works perfectly in Power BI Desktop might fail to refresh after being published This often happens because the Power BI service needs to be able to authenticate with the web data source (the Azure API).
    • Solution: In the dataset settings in the Power BI service, go to Data source credentials. You may need to edit the credentials for the Azure API, setting the authentication method to Anonymous and the privacy level to Public, since the API key is already included in the request header.
  • Hitting API Rate or Data Limits: The Azure Language Service has limits on how many requests you can make per minute and the size of the text in each request (e.g., a maximum of 5,120 characters per document for some synchronous APIs).
    • Solution: If you are processing a very large dataset that causes the refresh to time out or fail, you have a few options. You can either upgrade your Azure pricing tier for higher limits or modify your Power Query logic to batch requests or introduce a slight delay. For text that exceeds the character limit, you’ll need to split it into smaller chunks before sending it to the API.

Enriching Dashboards with Vision/Cognitive Image Analysis

Just as text holds hidden insights, so do images. Product photos, quality control snapshots, and social media posts can all be turned into structured data sources. By integrating Power BI with the Azure Cognitive Service for Vision, you can automate the analysis of visual content at scale, adding a powerful new dimension to your dashboards.

How Do You Send Image Data from Power BI to the Vision API?

Unlike text, which can be sent directly, images require a slightly different approach. The Vision API needs to access the image to analyze it. You have two primary ways to provide this access from Power BI:

  1. Publicly Accessible URLs: This is the most common and straightforward method. If your images are hosted online (e.g., on your company website, in cloud storage like Azure Blob Storage, or on a social media platform), you can simply provide the URL of the image to the API.
  2. Binary Data: If your images are stored in a database (for example, in a SQL Server varbinary(max) column), you can convert this binary data into a Base64-encoded text string. While this is more complex, it allows you to analyze images that are not publicly accessible.

For the purpose of this guide, we will focus on the URL method, as it covers the majority of business use cases.

Step-by-Step: Setting Up Image Tagging in Power Query

The process of connecting to the Vision API is very similar to connecting to the Language service. You will create a custom Power Query function to handle the API call. This example will focus on image tagging, which generates a list of descriptive labels for an image.

First, you’ll need your API Key and Endpoint URL from your Computer Vision resource in the Azure portal.

  1. Create a Blank Query: In the Power Query Editor, create a new blank query and name it fxGetImageTags.
  2. Open the Advanced Editor: With the new query selected, open the Advanced Editor.
  3. Insert the M Code: Paste the following M code. This function takes an image URL as input, sends it to the Vision API’s “tag” endpoint, and returns a comma-separated list of the generated tags. Remember to replace 

(imageUrl as text) =>

let

    apiKey = “YOUR_API_KEY”,

    endpoint = “YOUR_ENDPOINT_URL/vision/v3.2/tag”,

    jsonBody = “{‘url’:'” & imageUrl & “‘}”,

    requestHeaders = [

        #”Ocp-Apim-Subscription-Key” = apiKey,

        #”Content-Type” = “application/json”

    ],

    apiResponse = Web.Contents(endpoint, [

        Headers = requestHeaders,

        Content = Text.ToBinary(jsonBody)

    ]),

    jsonResponse = Json.Document(apiResponse),

    tags = try Text.Combine(List.Transform(jsonResponse[tags], each [name]), “, “) otherwise null

in

tags

  1. Invoke the Custom Function: Navigate to your table that contains a column of image URLs. Go to the Add Column tab and select Invoke Custom Function.
  2. Configure and Run: Name your new column (e.g., “ImageTags”), select your fxGetImageTags function, and choose the column containing the image URLs as the input.

After you click OK, Power BI will call the Vision API for each image URL in your table. The new “ImageTags” column will be populated with a list of descriptive tags (e.g., “building, skyscraper, city, outdoor”). You can then use these tags to filter, categorize, and analyze your visual data.

Solving Business Problems with Image Analysis

Integrating image analysis into your dashboards can provide concrete solutions to a variety of business challenges.

  • Automated Product Labeling & Search Enhancement
    • Business Problem: An e-commerce company has thousands of product images but relies on manual, often inconsistent, tagging for its website’s search function.
    • Solution: By using the image tagging feature, they can automatically generate a rich set of descriptive and consistent tags for every product image. A Power BI dashboard can then be used to analyze the most common product attributes and identify which visual features appear most often in their best-selling items.
  • Anomaly Detection in Manufacturing
    • Business Problem: A manufacturing plant needs to improve its quality control process. Currently, workers manually inspect products on the assembly line, which can be prone to human error.
    • Solution: Photos of products can be taken at various stages of production. Using a custom-trained Vision model (a more advanced feature), the company can automatically detect visual defects or deviations from a “golden standard.” A Power BI report can then flag these anomalies in near-real-time, showing the type of defect and the time it occurred, allowing for immediate intervention.

How to Handle Common Challenges and Performance Bottlenecks

Analyzing images, especially in large volumes, can introduce some unique performance considerations.

  • Handling Large Images: The size of an image file directly impacts the time it takes to upload and be processed by the API. Larger images take longer and can increase costs.
    • Solution: If possible, preprocess your images to a smaller, standardized resolution before analysis. For many tagging and object detection tasks, an image width of 500-1000 pixels is more than sufficient. You don’t need a high-resolution photo to identify a car or a person.
  • Performance Bottlenecks and API Limits: Just like the Language service, the Vision API has rate limits (a certain number of calls allowed per second or minute). Processing thousands of images in a single data refresh can easily hit these limits, causing the refresh to fail.
    • Solution: For very large datasets, it is best practice to perform the image analysis once and store the results. Instead of calling the API every time the dataset is refreshed, run the analysis in a separate dataflow and save the tags to a table. Your main Power BI report can then simply read from this results table, making refreshes fast and efficient. This also significantly reduces your API costs.

Designing AI-Driven Dashboards for Maximum Insight

Extracting sentiment scores and image tags is just the first step. The real value is unlocked when you present this AI-derived information in a clear, interactive, and actionable way. A well-designed dashboard helps decision-makers understand complex data at a glance and drill down into the details that matter.

How Should You Visualize AI-Driven Results in a Dashboard?

Standard charts and graphs work well, but their application needs to be tailored to the specific type of AI insight you are presenting. The goal is to translate abstract concepts like “sentiment” into clear business metrics.

AI Insight TypeRecommended VisualizationBusiness Purpose / Use Case
Sentiment AnalysisDonut Chart / Stacked Bar ChartTo show the overall proportion of positive, negative, and neutral feedback at a glance.
Line ChartTo track sentiment trends over time, correlating shifts with marketing campaigns, product launches, or service outages.
Key Phrase ExtractionWord CloudTo quickly and visually identify the most frequently mentioned topics in a large volume of text.
Horizontal Bar Chart / TreemapTo provide a ranked, quantitative view of the top customer issues or discussion points, making it easy to prioritize.
Image Tag AnalysisSlicer PanelTo enable users to interactively filter a gallery of images based on their content (e.g., show all images with “outdoor” and “smiling”).
Bar ChartTo analyze the frequency of different tags, revealing trends in visual content (e.g., which product features appear most often in images).

Guiding Principles for an Effective AI-Enhanced Layout

When you combine AI-derived insights with traditional business data, it’s crucial to design your dashboard layout thoughtfully to avoid confusion and build trust.

Guiding PrincipleImplementation & Rationale
Distinguish AI from Factual DataUse clear titles, subtitles, and dedicated sections to separate AI-generated insights from objective business metrics. This builds user trust by clarifying that AI insights are probabilistic interpretations, not hard facts.
Enable Drill-Through for ContextAlways allow users to click on an AI insight (e.g., “Negative Sentiment”) and navigate to the raw source data (the actual comments). This transparency is essential for validating the results and conducting deeper, qualitative analysis.
Focus on Actionable InsightsEnsure every visual helps answer a specific business question or supports a clear decision. Avoid cluttering the report with data that is interesting but not actionable, keeping the dashboard focused and impactful.

Practical Optimization Tips: Data, Performance, and Security

To ensure your AI-driven dashboard is not only insightful but also robust and efficient, follow these best practices:

  • Data Structure: Do not call the API every time the dashboard refreshes. This is the most critical optimization tip. Run the AI analysis once as a separate data preparation step (preferably in a Power BI dataflow), and store the results (the sentiment, key phrases, or image tags) in a table. Your main dashboard should then query this results table. This makes your dashboard load faster, dramatically reduces API costs, and avoids hitting rate limits.
  • Refresh Rate: Be strategic about your data refresh schedule. Data from last year’s customer survey doesn’t need to be re-analyzed every day. Align the refresh frequency of your AI dataflow with how often the source data actually changes.
  • Security: Avoid hardcoding your API keys directly into your Power Query M code. Instead, use Power BI parameters to store sensitive information like API keys. This makes them easier to manage and update without having to dig into the code. For enterprise-level security, consider using Azure Key Vault to manage your secrets.

Troubleshooting Common Errors and How to Fix Them

Even with a great design, you might run into issues, especially after publishing your report to the Power BI service.

  • Problem: Data Refresh Fails Due to API Quota/Rate Limits.
    • Cause: You are trying to process too much data in a single refresh, overwhelming the Azure Cognitive Services API.
    • Solution: Implement the best practice of running the AI analysis in a separate, less frequent dataflow and storing the results. This is the most reliable fix.
  • Problem: “Scheduled Refresh Failed” with Credential Errors in the Power BI Service.
    • Cause: The Power BI service doesn’t know how to authenticate with the Azure API on its own.
    • Solution: In the dataset settings within the Power BI service, find the data source credentials for your Azure API endpoint. Edit them and set the authentication method to Anonymous and the privacy level to a setting that allows it to connect (often Public or Organizational). This works because your secret API key is already embedded in the request header of your M query.
  • Problem: AI Results Seem to Change Slightly Over Time.
    • Cause: Microsoft continuously improves its AI models. An update to the sentiment analysis model, for example, might slightly change how it classifies certain borderline-neutral comments.
    • Solution: This is normal and generally a sign of improvement. Focus on high-level trends and patterns rather than obsessing over the classification of a single data point. As long as the overall accuracy remains high, these minor shifts should not impact your strategic insights.

Summary and Conclusion: Your Next Steps in AI-Driven BI

Integrating Power BI with Azure Cognitive Services bridges the critical gap between your business data and the wealth of insights hidden in unstructured text and images. As we’ve seen, this combination allows you to move beyond traditional analytics and quantify concepts like customer sentiment, emerging support trends, and the content of your visual assets.

Here are the key takeaways:

  • Unlock New Insights: You can analyze customer feedback, support tickets, and image libraries directly within your BI environment to get a more complete view of your business.
  • A Flexible, Future-Proof Workflow: The most robust way to connect these services is by calling the APIs directly from Power Query. This method gives you full control and aligns with Microsoft’s long-term strategy, especially with the planned retirement of built-in functions in 2025.
  • Optimize for Performance: The best practice is to separate the AI analysis from your final report. Run the Cognitive Services functions in a Power BI dataflow that refreshes only as often as needed, and have your dashboard query those stored results for maximum speed and efficiency.

Your next step is to start small. Choose one of the business scenarios we’ve discussed – perhaps analyzing a recent batch of customer survey responses and follow the steps to build your first AI-enhanced report. The power to understand your business on a deeper level is now at your fingertips.

contact

Thank you for your interest in Multishoring.

We’d like to ask you a few questions to better understand your IT needs.

Justyna PMO Manager

    * - fields are mandatory

    Signed, sealed, delivered!

    Await our messenger pigeon with possible dates for the meet-up.

    Justyna PMO Manager

    Let me be your single point of contact and lead you through the cooperation process.