Power BI

Use Power BI to report on your Conversation Intelligence (CI) data. Capacity delivers interaction data to an Azure Data Lake Storage Gen2 container that you own, and Power BI connects to that container as its data source. This article covers the Azure setup, the details to share with Capacity, and how to connect and prepare the data in Power BI Desktop.


How It Works

After an interaction is ingested and transcribed in CI, an outbound webhook sends the interaction data to a dedicated Capacity endpoint. Capacity transforms the data from JSON into Parquet, a file format designed for analytics, and writes the Parquet files to your Azure Data Lake Storage Gen2 container. Power BI then reads the files from that container.

For details of the fields in each interaction, see Conversation Intelligence Data Model.


Before You Begin

  • You need an Azure account that can create storage accounts and containers, and retrieve access keys or generate SAS tokens.
  • You need Power BI Desktop installed.

Azure Configuration

Create a Storage Account and Container

  1. Go to portal.azure.com and sign in.
  2. In the left-hand menu, select Storage accounts
  3. Select +Create.
  4. Under Resource group, choose an existing group or create a new one.
  5. Enter a name for the storage account and select a region.
  6. Under Primary service, select Azure Blob Storage or Azure Data Lake Storage Gen2.
  7. On the Advanced tab, make sure Enable hierarchical namespace is selected. This turns on the Data Lake Gen2 features.
  8. Select Review + create, then select Create.
  9. When the storage account is ready, select Go to resource, then select Containers in the left menu.
  10. Select + Container
  11. Name the container, and set Anonymous access level to Private (no anonymous access).
  12. Select Create.

Retrieve the Primary Data Lake Endpoint

  1. In your storage account, go to Settings and select Endpoints.
  2. Under Primary endpoint, copy the URL next to Data Lake Storage. This is your primary Data Lake endpoint. You'll share it with Capacity.

Choose Authenticate Method

Capacity needs credentials to write files to your container. You can provide either an access key or a SAS token.

CredentialAccessBest for
SAS token (recommended)Limited to the permissions, scope and expiry date you choose when you create it.Giving Capacity access to this container only.
Access keyFull access to the entire storage account.A storage account used only for this integration.

Option 1: SAS Token

  1. In your storage account, select Containers, then select the container you created.
  2. Select Shared access tokens in the left menu.
  3. For Signing method, select Account key.
  4. Set Permissions.
    SettingValue
    Permissionssp=racwdlme
  5. Set a Start and Expiry date. Choose an expiry far enough ahead for ongoing use, and make a note of the date.
  6. Select Generate SAS token and URL.
  7. Copy the Blob SAS token. This is the token you'll share with Capacity.

Option 2: Access Key

  1. In your storage account, go to Security + networking and select Access keys.
  2. Copy one of the Key values. This is the key you'll share with Capacity.

What to Share with Capacity

Share the following securely with Capacity. Contact creovai-support@capacity.com to arrange how.

ItemDescription
Storage account nameThe name of the storage account you created (also called the deployment name).
Data Lake Storage primary endpointThe URL you copied from Endpoints.
Container nameThe name of the container Capacity will write to.
Access key or SAS tokenThe credentials configured above. Tell us which type you're sending.
SAS token expiry dateIf you're using a SAS token, the date it expires.

Power BI Configuration

Once data is arriving in your container, follow these steps to connect Power BI to it.

Create the Data Source

  1. Open Power BI Desktop.
  2. On the Home tab, select Get Data.
  3. Select Azure, then Azure Data Lake Storage Gen2, then select Connect.
  4. Enter your primary Data Lake endpoint, followed by a forward slash (/) and your container name, then select OK.
    https://<storage-account-name>.dfs.core.windows.net/<container-name>
  5. When Power BI asks you to authenticate, choose the method that matches how you're set up:
    MethodWhat to do
    Account keySelect Account key, enter your access key, then select Connect.
    Shared access signature (SAS)Select Shared access signature (SAS), enter your SAS token, then select Connect. The token needs read and list permissions on the container.
  6. Power BI lists the files in your container. Select Combine >> Combine & Transform Data.
  7. Power BI identifies the file type as Parquet. Select Transform Data.

Prepare the Data

Power BI opens your combined Parquet files in Power Query Editor. Each interaction contains nested data (call groups, classifications and participants) packed into single columns. In this step, you'll move each of these into its own table and expand it, so the data is easy to report on.

When you finish, you'll have four tables. Each one links back to its interaction using callId.

TableContains
InteractionsOne row per interaction, with its duration and other top-level details.
Call GroupsThe call groups assigned to each interaction.
ClassificationsWhat CI detected or scored on each interaction (for example, CSATai).
ParticipantsThe agent and customer on each interaction.

Clean Up the Main Query

  1. Delete the columns you don't need for reporting:
    • textHits
    • customText
    • customStrings
    • customLongs
    • customDoubles
    • customDateTimes
    • evaluatedCustomFields
    • matchedCustomFields
  2. Right-click the main query and select Rename. Name it Interactions.

Create Sub-Queries

Repeat the steps below three times, once for each row in the table that follows.

  1. Right-click the Interactions query and select Duplicate.
  2. Rename the new query.
  3. Delete every column except callId and the column listed for that query.
  4. Select the expand button at the top of that column.
  5. Clear the checkboxes listed for that query, then select OK.
Rename the query toKeep these columnsClear these when expanding
Call GroupscallId, callGroupsid
ClassificationscallId, classificationsid
ParticipantscallId, participantsparticipantId, refId, segments

Finish the Interactions Query

  1. Select the Interactions query.
  2. Delete the three columns you've moved into their own queries: callGroups, classifications and participants.
  3. Select the Duration column.
  4. On the Add Column tab, select Duration >> Total Seconds. This adds a column that makes calculations such as average handle time (AHT) easier later.

Load the Data

  1. On the Home tab, select Close & Apply.

Power BI loads your four tables: Interactions, Call Groups, Classifications and Participants. Your data is now ready for reporting.


Recommended Measures

These measures are a starting point for your reports.

Main TableMeasureComments
InteractionsTotal Seconds HH:mm:ss
= TIME(0,0,SUM('Interactions'[Total Seconds]))
Total seconds, formatted as HH:mm:ss.
Total Seconds Avg. HH:mm:ss
= TIME(0,0,AVERAGE('Interactions'[Total Seconds]))
Average of total seconds, formatted as HH:mm:ss.
ParticipantsTotal CSATai Satisfied
= CALCULATE(
    COUNT('Participants'[callId]),
    FILTER(
        Classifications,
        Classifications[classifications.content] = "Satisfied"
    )
)
Total number of calls with a Satisfied rating from CSATai.
Total Calls by CSATai Satisfied
= DIVIDE(
    [Total CSATai Satisfied],
    COUNT('Participants'[callId])
)
Percentage of total calls rated Satisfied by CSATai.

If you need help with this integration, contact creovai-support@capacity.com.


Was this article helpful?