By Scott Sugar on May 11, 2023

Power BI Usage Metrics Across All Workspaces: Step by Step

In this blog, we will discuss how you can leverage Power BI workspaces to enhance usage metrics and analytics for your data visualization reports, dashboards, and datasets within the business intelligence domain.

As the saying goes, "You can't manage what you can't measure." Thus, it's crucial to track the performance of your reports and dashboards in the online Power BI service to manage your tenant's business intelligence capabilities better. By analyzing which data visualizations are gaining the most attention and from whom, you can gain valuable insights into optimizing your Power BI workspaces and their impact on reporting.

To achieve a unified view of usage metrics and performance tracking across the tenant, these metrics can be saved and edited at the report/dashboard level and unfiltered to display usage across an entire workspace. However, monitoring usage at the workspace level isn't scalable for organizations with multiple workspaces.

That's why utilizing the built-in Power BI usage metrics and analytics in the Admin portal is essential for obtaining comprehensive insights and effective reporting across your entire business intelligence infrastructure.


In this blog, you will find:

📊  Power BI Usage Metrics: Solution Walkthrough

🌐 Create Power BI Streaming Dataset

📝 Get-PowerBI Usage Script

📈 Create Power BI Report

💡 Thoughts and Next Steps


The Admin portal offers usage metrics, which may not be customizable or interactive. Instead of focusing on "who has how many reports/dashboards," the key is determining "who's using the service, and what are they looking at?"Microsoft power bi admin portalTherefore, this blog will delve into how to use Power BI workspaces to enhance the usage metrics of your Power BI service, with a specific focus on how to use the built-in usage metrics report for Power BI:

Are you ready to optimize your Power BI workspaces and unlock valuable insights? Eager to enhance your data visualization reports, dashboards, and datasets?

Get in touch with ProServeIT, and let us help you transform your business intelligence capabilities and performance tracking.

Don't wait – reach out to us today!

Let's Talk

 

Power BI Usage Metrics: Solution Walkthrough

Set up Pre-Requisites

We have a few things we need to set up in order to get this solution working:

  • Azure AD Global Admin account; A privileged account that has complete access to all Azure AD features and functionalities.
  • Azure AD Application - to help us authenticate to the O365 Management APIs
  • Power BI Streaming Dataset - to hold the Power BI activity logs

    Create an Azure AD Application

1. log in to Azure AD Admin Portal and Create a new Azure AD Application

  1. Click App Registrations
  2. Click New Registration

Azure AD Application: how to register an application

2. Register Azure AD Application

  1. Enter Application Name
  2. Select Supported Account Types (default is fine if gather activity logs for one tenant)
  3. Click Register

how to register Azure AD Application

3. Add API Permissions

  1. Click API Permissions
  2. Click "Add permission"
  3. Click "Office 365 Management APIs"

How to Add a permission in Microsoft Azure

4. Request API Permissions

  1. Click "Application Permissions"
  2. Select ActivityFeed.Read
  3. Select ServiceHealth.Read
  4. Click "Add permissions."

how to Request API Permissions power bi

4a. Grant Admin Consent for your org

  1. Click "Grant admin consent for ..."
     
    How to grant Consent in Microsoft Azure

5. Gather Application (client) ID, and Directory (tenant) ID

  1. Click Overview
  2. Copy the Application ID and Directory ID into notepad for use later.

power bi Gather Application ID and Directory

6. Create Client's secret

  1. Click Certificates and Secrets
  2. Click New client secret
  3. Enter a description
  4. Click "Add"

how to Create Client Secret in power bi

7. Gather Client's secret

  1. Copy the Client's secret into notepad for use later

how to Gather Client Secret with power-bi


Stay up to date with ProServeIT! ðŸ“¨

Our monthly newsletter has all that as well as insightful information on relevant technology, webinars and workshops. Make sure to sign up now for your dose of tech knowledge delivered straight to your inbox!


Create Power BI Streaming Dataset

1. Create a Streaming dataset

  1. Click +Create
  2. Click on a Streaming dataset

Power BI Steaming Dataset


2. Select the data source

  1. Select API
  2. Click Next

Tutorial Power BI Steaming Dataset


3. Enter dataset and field names

  1. Enter a dataset name
  2. Fill in the "Values from stream" section per the screenshot below.
    Note: CreationTime is type DateTime; everything else is text.

Tutorial Power BI Steaming Dataset


4. Turn on historical data analysis and create the dataset

  1. Scroll down
  2. Enable "Historical data analysis."
  3. Click Create

Tutorial Power BI Steaming Dataset

5. Gather PowerShell Code

  1. Click on PowerShell
  2. Copy the endpoint URL to notepad for use later
  3. Click Done

Tutorial Power BI Steaming Dataset

Get-PowerBI Usage Script

The PowerShell script we'll use to grab the activity logs from the O365 Management API and load the results into a Power BI Streaming Dataset can be found here.  Please save the script to a folder on your computer, open up PowerShell and change to the same directory where you saved the script.

Update Script

Before trying to run the script, please update the variables at the top of the script with the values we copied into notepad.

how to update power bi usage script

Run Script

To start, you'll need to "create a subscription" so the Management API will start to save your tenant's activities for later retrieval.

.\Get-PowerBIUsage.ps1 -startSubscription

Loop Script

The code below will continue to look for available activity logs every 15 minutes and push the log entries into to the streaming dataset.

while($true){
.\Get-PowerBIUsage.ps1
Start-Sleep -Seconds 900
}

 

Create Power BI Report

At this point, you can start creating your Power BI report and answering some of our previous questions. As a start, let's look at what the most popular reports are in our tenant:

1. Create a report

  1. Click on Datasets
  2. Click on Create report

Tutorial Create Power BI Report

2. Create Top Operations by Report Name visualization

  1. Click on the "Stacked bar chart" visualization
  2. Drag and drop Report Name into the Axis
  3. Drag-and-drop Operation into the Value (will become count of operation)

Tutorial Create Power BI Report

With the above in place, we can see that our "Revenue by Sales Rep v3" report is our most used (i.e., popular) report. From there, we can add slicers and other visualizations or tables to continue to delve into our tenant's Power BI usage and find out "who's using the service, and what are they looking at?".

Are you ready to optimize your Power BI workspaces and unlock valuable insights? Eager to enhance your data visualization reports, dashboards, and datasets?

Get in touch with ProServeIT, and let us help you transform your business intelligence capabilities and performance tracking.

Don't wait – reach out to us today!

Let's Talk

 

Thoughts and Next Steps

This was a quick introduction to Azure AD Application authentication to the O365 Management Activity API and to loading Power BI activity data into a Power BI streaming dataset.

With some work, this could be expanded to capture other O365 activity data (Exchange, SharePoint, Teams, DLP, etc.) and could be used to save activity log information to long-term storage (instead of a streaming dataset).

Let us know what interests you, which will help us tailor our future technical blog postings. As always, if you have any issues or would like to ask us any questions, please reach out to us.


HIROC using Power BI

Published by Scott Sugar May 11, 2023