# Create the Power BI report

## Download

Download the Power BI template for the **Overview** report [here](https://github.com/SMSAgentSoftware/PatchMyPCReport/blob/main/Patch%20My%20PC%20Overview%20Report.pbit).

## Configure the datasource

* Open the Power BI template with Power BI desktop
* Upon opening, you will be prompted for the **storage account name** and the **container name**

<figure><img src="https://3886807721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWe9ieepRHnj7T8odXt%2Fuploads%2FKFCvW2WgYH5Cd8URidNr%2Fimage.png?alt=media&#x26;token=68f67def-c5bc-48ba-9626-18eb3f36f766" alt=""><figcaption></figcaption></figure>

* Enter the **name** of the Azure storage account where you are saving the CSV exports
  * Make sure there are no spaces surrounding the storage account name
* Enter the **name** of the container in the Azure storage account where the CSV files are exported to
* Click **Load**
* If this is the first time you are connecting to the storage account with Power BI, you will be prompted for the **Account key**. Retrieve this from the storage account under **Access Keys**.

![](https://3886807721-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWe9ieepRHnj7T8odXt%2F-M_SUJ4aQrsgBHnHlFOF%2F-M_SWAQtLAU1fn3CIPe9%2Fimage.png?alt=media\&token=c369751b-b078-4c51-87fd-048ca10cbcab)

Your data will then be imported into the report.

{% hint style="warning" %}
If you regenerate your storage account keys, you will need to update your Power BI report.
{% endhint %}

## Publish the report

Once your report has been created, you can publish it to the Power BI service by clicking **Publish** on the **Home** menu.

Once published, you can schedule the data to refresh periodically to keep the report up to date. Do not refresh more frequently than the schedule of your automation runbook and don't configure the report to refresh at the same time - try 30 minutes later for example. There is no need to use a data gateway as the storage account data source is also a cloud service.

{% hint style="info" %}
When publishing the report to the Power BI service, for better security you may wish to configure a service principal to connect to the Azure storage account rather than using the account key.
{% endhint %}
