Skip to content

Latest commit

 

History

History
53 lines (27 loc) · 2.63 KB

power-bi-dashboard.md

File metadata and controls

53 lines (27 loc) · 2.63 KB

Power BI Dashboard

Power BI is a business analytics service by Microsoft. It aims to provide interactive visualizations and business intelligence capabilities with an interface simple enough for end users to create their own reports and dashboards.

In this accelerator, we will be using Power BI to create a dashboard that will display the data from the Cosmos DB Database.

Prerequisites

  • Download and install the Power BI Desktop application from the Microsoft Store on Windows or from App Store on Mac.

  • Make sure that you can access the Cosmos DB from your local machine (you might need to allow you public IP to access Cosmos DB).

Cosmos DB Firewall

Insert Data

Note: Pricing in the sample file is based on the public Azure pricing for East US region (which in many cases similar to other regions). You can review the prices on Azure docs related to the service being used and update the model-pricing accordingly.

Preparing the Power BI Dashboard

Now you can open the src/usage-reports/AI-Hub-Gateway-Usage-Report-v1-4.pbix file in the Power BI Desktop application.

As this PowerBI file is using import mode, you should see some data already there from previously connected data source.

In order to link the dashboard to the Cosmos DB, you need to update the connection string in the Power BI file.

  1. Click on "Transform Data" in the Home tab.

Transform Data

  1. Right click on the "ai-usage-container" data table and select "Advanced Editor".

Edit Data

  1. Replace the Cosmos DB endpoint with the one you have deployed.

Edit Data AI Usage

  1. Repeat the same for model-pricing data table.

Edit Data Model Pricing

  1. Click on "Refresh Preview" to force the Power BI to refresh the data.

  2. Click on "Close & Apply" to save the changes.

  3. Now you should see the data from the Cosmos DB in the Power BI.

Power BI Dashboard

  1. If you need to get fresh copy of the data, you can click on "Refresh" in the Home tab.