Eugene Mazarakis
19 October 2024

Unlocking the Power of Partitioning in Power BI: The Game-Changer for Semantic Models!

by Eugene Mazarakis

Introduction

Power BI offers the capability, when designing a semantic model containing tables, to create partitions within these tables, enabling faster loading of large tables into the model. This is achieved by refreshing only the data of the most recent partitions during each refresh cycle. This functionality is particularly useful, as it significantly reduces the time required to refresh the semantic model in Power BI service, and also allows for the creation of models that include extremely large tables.

Let’s assume that we have the following architecture:

Photo 0

Our data resides in Azure Synapse Analytics, and we will connect to it using Power BI Desktop to create a semantic model. We will then apply an incremental refresh policy, which enables the creation of partitions in the tables. Once the model is ready, we will publish it to Power BI Service within a premium workspace.

NOTE While it is possible to publish the model in a shared workspace, this option comes with certain limitations regarding the management of the model’s partitions. See Section: Shared Capacity Limitations

Semantic model specifications

The semantic model to be created will have the following specifications:

  1. Import storage mode will be utilized.
  2. Two parameters will be implemented to enable incremental refresh. See References 3,4
    • RangeStart & RangeEnd (be careful case sensitive and DateTime data type)
  3. Incremental refresh policy will be applied. See References 1,2
    • Partitions will be created for XXX historical months and YYY refresh period months. For this case, we will work with the month option.
    • Alternatively, we can select years, quarters, or days for the historical period and refresh period.

Steps for Model Creation

In order to create and publish the semantic model, we do the following steps:

Photo 1

Photo 2

Photo 3

Photo 4

Photo 5

Photo 6

Photo 7

Photo 8

Photo 9

Photo 10

Photo 11

Photo 12

Photo 13

Photo 14

Photo 15

Photo 16

Photo 17

Photo 18

Photo 19

Photo 20 Photo 21

Photo 22

Photo 23

Photo 24

Photo 25

Shared Capacity Limitations

  1. A shared capacity workspace has a semantic model/report size limit of 1 GB.
  2. We cannot connect to a Power BI shared workspace using SSMS or Tabular Editor to manipulate the tables’ partitions. See References 8,9,10,11

References

  1. Incremental Refresh Overview
  2. Define Incremental Refresh Policy on table
  3. Create Parameters
  4. Reference Parameters in the M query
  5. Partitions
  6. Refresh History of the semantic model
  7. Size of the Semantic Model on PBI Service
  8. Get the workspace connection URL
  9. Connect to workspace by using SSMS
  10. Refresh Partition with SSMS
  11. Tabular Editor Apply Incremental Refresh Policy
tags: PBi Desktop - PBi Service - Incremental Refresh - Semantic Model