Power BI

Keeping a Semantic Model Warm

5min

When not in use, Power BI may put a model in a hibernating state to save resources. This can cause the model to appear slow upon initial load. To prevent the first user from experiencing a slow model, you may wish to keep the model "warm".

The easiest way to keep a model warm is to mimic a user opening the report in advance. There are many ways to achieve this, but the easiest is to use a Power Automate flow. This document will guide you through the setup process for such a flow.

Creating the flow

  1. Navigate to your flows in Power Automate
  2. Click on "New flow" and select "Scheduled cloud flow"
Document image


You will then be prompted to name your flow & select when it should run. Every 10 minutes should be enough. Once created, follow these steps to configure the action:

  1. Click on the "+" to add an action
  2. From the panel, search for "run a query"
  3. Select the Power BI action, "Run a query against a dataset"
Document image


Then fill in the required parameters, "Workspace" & "Dataset". You will also need to fill out the query text. If you are experienced with DAX, you may want to fill this out directly. If not, then the next steps will show you how to extract one from your model.

Extracting a DAX query

To ensure the query that warms the model is as realistic as possible, you may want to pull it directly from your model. This can easily be done in Power BI Desktop. Open the report and then:

  1. Go to the Optimize Tab
  2. Open the Performance Analyzer
  3. Start a recording
  4. Refresh the visuals
  5. Locate a visual that is slow on initial load, expand it and click on "Run in DAX Query View".
Document image


Modify the query if necessary, then copy the content into the "query text" field of your flow. Save the flow and perform a test run to ensure it works correctly.

Testing and Adjustments

After setting up the flow, perform tests to check if the performance has improved. If the model is still slow, you may need to adjust the query or add additional queries.