Instant
← All posts

Accessing Chime Reports with Power BI

Patrick Madden

Overview

This guide walks through pointing Microsoft Power BI Desktop at the Chime reporting API so you can build a service-desk dashboard that refreshes on its own. Anything available as a CSV inside the Chime admin console can be pulled the same way — queue basics, agent efficiency, performance, text analytics, bot performance, and so on.

Before you start

You’ll want two prerequisites in place:

Option 1: Blank Query + Advanced Editor

The simplest path is to paste an M-language query into the Advanced Editor. In Power BI Desktop, click Get Data › Blank Query:

Power BI Get Data dialog with Blank Query selected
Start from a Blank Query when you already have the URL handy.

On the resulting query, open Advanced Editor and replace the body with a single Web.Contents call, passing your bearer token in the headers:

Power BI Advanced Editor showing the M query for Web.Contents
The query is just a single Web.Contents call.
let
    Source = Web.Contents(
        "https://ch-teams-net1.imchime.com/Chime/Report/InboundVsAnsweredChats?queueId=1&start=2020-11-01T04:00:00.000Z&stop=2020-12-01T04:59:59.999Z&csv=true",
        [
            Headers = [
                #"Method" = "GET",
                #"Authorization" = "Bearer <YOUR-API-KEY>"
            ]
        ])
in
    Source

Click Done, then To Table › Use First Row as Headers, and the CSV body comes back as a typed Power BI table:

Power BI Query Editor showing the parsed CSV result
The CSV body comes back as a typed Power BI table.

Option 2: Web data source

If you prefer the UI to the M editor, the Get Data › Web data source can do the same thing. Switch to Advanced, paste the endpoint into URL parts, leave the method as GET, and add an Authorization header:

Power BI From Web advanced setup with Authorization header
Configure the URL, method, and Authorization header.
Detailed view of the advanced From Web configuration window
The full set of advanced options for the Web connector.

Make the date range dynamic

The query above is pinned to a fixed window, which means the dataset will go stale on the next refresh. The fix is to compute start and stop at query time. The snippet below builds yesterday-to-today strings and concatenates them into the URL:

let
    todaystring     = Date.ToText(DateTime.Date(DateTime.LocalNow())),
    daybeforestring = Date.ToText(DateTime.Date(Date.AddDays(DateTime.LocalNow(), -1))),
    chimeServer     = "https://ch-teams-net1.imchime.com",
    queueId         = "1",
    url = chimeServer
        & "/Chime/Report/InboundVsAnsweredChats"
        & "?queueId=" & queueId
        & "&start=" & daybeforestring & "T00:00:00.000Z"
        & "&stop="  & todaystring     & "T23:59:59.999Z"
        & "&csv=true",
    Source = Web.Contents(url, [
        Headers = [
            #"Method"        = "GET",
            #"Authorization" = "Bearer <YOUR-API-KEY>"
        ]
    ])
in
    Source

From here you can use the same technique to build rolling-week or month-to-date variants — anything you can compute as a string of ISO-8601 timestamps:

Power BI Transform Data view with the dynamic query applied
The dynamic query refreshes correctly every time Power BI refreshes the dataset.

Publish

Once the report looks right in Power BI Desktop, use Publish to push it to a Power BI workspace. Scheduled refresh on the workspace will then keep the dashboard in sync with whatever the Chime API returns.

Tags

  • Chime
  • Power BI
  • Reporting
  • Integration