Configure the Power BI report

In this step, we'll create a Power BI report from a template

Before configuring the Power BI report, make sure you have data from your workstations in your log analytics workspace, and make sure the automation runbooks have run at least once. Without data, the kusto queries in the Power BI report will fail.

Download

Download the Power BI report template from here:

Configure the report

Using Power BI desktop, open the report template. Upon opening, you'll be prompted for the workspace ID of your log analytics workspace, and the data retention period. The latter is used to determine how far back in time the report queries will search for data.

Click Load.

If it's the first time you've connected to the log analytics workspace with Power BI, you'll be prompted for credentials. Choose Organizational account, sign in with your organizational account, and optionally select the level to apply to, or just accept the default. Click Connect.

The account you sign in with should have at least the Log Analytics Reader role in the log analytics workspace.

After successful authentication, your report will run the kusto queries and load the data. If you have only just started collecting data from your workstations, some pages like the trend pages will not contain much data yet so will look better over time.

Publishing to the Power BI service

If you wish to publish your report to the Power BI service and enable scheduled refresh, you will need a kind of service account that can be used to connect to the log analytics workspace. It should be an Azure AD account (either native or synced), should have at least the Log Analytics Reader role in the log analytics workspace, and the password should be infrequently changed.

Once you've published your report, locate the dataset and choose the Settings option.

Under Data source credentials, click Edit credentials.

In the Configure window, choose OAuth2 as the authentication method, and Organizational for the privacy level. Click Sign in, and sign in with your service account credentials.

You can then schedule a refresh and it will use these credentials to access the log analytics workspace to update the data.

Ideally your refresh schedule should be synchronized with the schedule of your automation runbooks. Schedule a refresh maybe 10-15 minutes after each execution of the runbooks so that your report refreshes with the latest data as soon as its available.

Last updated