Sub topic 6
How the policy becomes partitions
This chapter assumes you have created the RangeStart and RangeEnd parameters, filtered a table with them, and set a refresh policy in Power BI Desktop. It explains what the service does with that policy after you publish.
From policy to partitions
A refresh policy is a set of rules, not a set of partitions. Power BI Desktop stores the rules with the table. It does not create the partitions locally. Desktop loads only the slice of data between RangeStart and RangeEnd.
The partitions are created in the Power BI service. This happens during the first refresh after you publish the model. The service reads the policy, takes the current date, and creates one partition for each period the policy describes.
The policy from the earlier chapters looks like this in the model metadata:
{
"refreshPolicy": {
"policyType": "basic",
"rollingWindowGranularity": "year",
"rollingWindowPeriods": 5,
"incrementalGranularity": "day",
"incrementalPeriods": 10
}
}The rolling window is the archive period. It says how much history to keep: five years. The incremental settings say how much of that window to refresh each time: the last ten days.
The three kinds of partition
The service sorts the data into three groups by age.
| Partition type | Granularity | Refreshed on each run? | Example for this policy |
|---|---|---|---|
| Archive | Year (or the coarser units of the rolling window) | No | Years 4 to 1 before the current year |
| Incremental | Day | Yes | The last 10 days |
| Current period | Depends on the policy | Yes | Today, or the current month or year |
Archive partitions hold old data that is assumed to be stable. Once the service has loaded them, later refreshes leave them alone. Incremental partitions are the ones that are reloaded every time.
As time passes, the service rolls the window forward. Days move from the incremental range into the archive. Older days are merged into coarser partitions, and partitions that fall outside the rolling window are dropped.
How each partition gets its data
Every partition has its own date boundaries. When the service refreshes a partition, it substitutes those boundaries for RangeStart and RangeEnd and runs your query.
For a partition covering 1 March to 2 March, the folded query behaves as if you had written this:
let
Source = Sql.Database("myserver.database.windows.net", "SalesDb"),
FactSales = Source{[Schema = "dbo", Item = "FactSales"]}[Data],
Filtered = Table.SelectRows(
FactSales,
each [OrderDate] >= #datetime(2026, 3, 1, 0, 0, 0)
and [OrderDate] < #datetime(2026, 3, 2, 0, 0, 0)
)
in
FilteredBecause one boundary uses >= and the other uses <, each row lands in exactly one partition. If you used >= and <= on both ends, a row at midnight would be loaded twice and your totals would be wrong.
Query folding matters here. If the filter folds, each partition sends a small WHERE query to the source. If it does not fold, every partition downloads the whole table and filters it in the service. You then pay the cost of a full load once per partition.
What you see after the first refresh
The first refresh is the slowest one, because it loads every partition, including the archive. Later refreshes touch only the incremental partitions.
You will notice two things in the service:
- The partitions are not visible in Power BI Desktop. The published model can no longer be downloaded as a .pbix file once the policy has been applied.
- The partition names are generated by the service, such as
2022,202603, or20260301. You do not set them.
To see them, connect with a tool that uses the XMLA endpoint, such as SQL Server Management Studio. A later chapter covers that.
Common mistakes
- Expecting partitions in Desktop. They exist only after the first service refresh.
- Using a non-folding filter. The partitions exist, but each one reads the whole source table.
- Expecting archive partitions to pick up late-arriving changes. They are not refreshed unless you use detect data changes or refresh them manually.
Exercise
A table has a policy of 3 years of history and 7 days of incremental refresh. Right after the first refresh, a row from 8 months ago is corrected at the source. Will the next scheduled refresh load the correction, and why?
Show answer
No. A row from 8 months ago sits in an archive partition, and scheduled refreshes reload only the incremental partitions (the last 7 days). The correction appears only if you refresh that partition manually, for example through the XMLA endpoint, or if detect data changes is set up on a column that reflects the change.
Exercise
Why must the filter use >= on one boundary and < on the other?
Show answer
Each partition substitutes its own boundaries for RangeStart and RangeEnd. With one inclusive and one exclusive boundary, a row on a boundary belongs to exactly one partition. Using >= and <= on both ends would load boundary rows into two partitions and double count them.