How To Use Text Analytics In Power BI

As a cloud architect, I recently had the opportunity to work on a project where I used Text Analytics in Microsoft Power BI. This Azure tutorial will discuss using Azure Text Analytics in Power BI with a realtime example.

How To Use Text Analytics In Power BI

Here, we will have a Product and some Review Comments from different users, which include Key Phrases and the sentiment of the text (positive or negative). This is the report we have to generate, which will help the vendor understand the quality of the product from the user’s perspective so that the vendor can improve the product quality if needed.

So, if we start developing this requirement using custom code, achieving this functionality will be difficult. It will take a lot of time and resources. But we can quickly achieve this requirement using the Azure Text Analytics service with the help of Power BI. Before starting the development, we should know What Azure text analytics is and the Prerequisites needed to start the actual functionality.

Before starting the actual development, we should know the prerequisites.

Prerequisites

  • You must have an Azure account or a valid Azure Subscription. If you haven’t had an Azure account yet, create a Free Azure Account now.
  • Power BI Desktop.

Create and configure Azure Text Analytics

You need to follow the below steps to Create and configure Azure Text Analytics.

1. Log in to the Azure Portal (https://portal.azure.com/)

Once you log into the Azure Portal, click the + Create a Resource button from the left panel.

text analytics power bi

2. Search for the Text Analytics as shown below.

power bi text analytics

For the same option, once you log in to the Azure Portal, search for Text Analytics in the global search and click on the search result Text Analytics under the Marketplace.

text analytics power bi

3. On the Create window, provide the details below to create the Azure Text Analytics service.

  • Name: Provide a unique name for the Azure Text Analytics service.
  • Subscription: Choose the correct subscription that you want to use to create the Azure Text Analytics service.
  • Location: Choose a location for the Azure Text Analytics service.
  • Pricing Tier: Choose a pricing tier based on your requirements. You can choose the Free F0 for the demo or use a maximum of 5K transactions per 30 days. To learn more about the pricing structure, click the view complete pricing details link.
  • Resource Group: Choose an existing Resource Group, or you can click on the Create new link to create a new Resource Group.

Finally, click the Create button to create the Azure Text Analytics service.

How to create Azure Text Analytics

You can see that the deployment is completed successfully.

text analytics azure

4. Click the Go to Resource button to navigate to the Azure Text Analytics service you created.

Use Azure Text Analytics In Power BI

5. Now Our Azure Text Analytics service is ready, The next step is to copy the Key1 value of the Azure Text Analytics service, and we will keep it in Notepad as we are going to use this in the Power BI in the next section. To copy the key1 value, click on the keys and Endpoint link from the left navigation, and then you can see the Key1 and Key2 values. Click the copy button as highlighted to copy the Key1 value and keep it in a notepad.

You can also click the Show keys button to see the value of Key1 and Key2, or click the Regenerate Key1 and Regenerate Key2 buttons to regenerate a new key for these.

text analytics using power bi

Now, our Azure Text Analytics service is complete. The next is to start with the Power BI changes. This is how we can create and configure Azure Text Analytics in the Azure Portal.

Configure The PowerBI Report To Read Textual Data

Well, here we will Configure The PowerBI Report To Read Textual Data. We will use PowerBI Desktop for this purpose.

I have captured the Product Review comments in an Excel sheet for implementation. It contains the column values below.

  • Date
  • Users
  • ProductComments
azure text analytics service

Load Data Into Power BI

Now is the time to load the Excel data to the Power BI Desktop. Follow the steps below to load the Excel data into the Power BI.

1. Open the Power BI Desktop as shown below.