Power BI Incremental Refresh on a Lakehouse: Prove RangeStart/RangeEnd Query Folding
Prove Power BI incremental refresh filters reach a lakehouse SQL endpoint using RangeStart, RangeEnd, native queries, diagnostics and query history.
Incremental refresh pays off only when the RangeStart/RangeEnd window reaches the lakehouse SQL analytics endpoint instead of being applied after the rows arrive. Folding is the usual way to get there, but it isn't the only one: Microsoft notes there's "no requirement for final query to support folding," so a pure Import policy can also send a hand-built native SQL query with the date range embedded (incremental refresh overview). Either path works — what you must prove is that the boundary travelled with the query, not after it.
This article is a diagnostic method, not a storage-mode comparison. It separates a partition filter the endpoint evaluates from one applied after retrieval, and it marks where Import incremental refresh, Direct Lake and DirectQuery diverge at a lakehouse endpoint. It assumes a Fabric lakehouse whose SQL analytics endpoint is the source, and an Import-mode model with an incremental refresh policy in place. Which mechanism fits your source is a separate question, because folding support differs by data source.
The upstream end of that pipeline matters too, because partition queries can only bound what the ingestion layer keeps. If you also use a lakehouse platform such as Singdata Lakehouse Studio alongside Microsoft Fabric — Singdata is a separate data platform, not the Fabric SQL analytics endpoint — check that its ingestion and table-optimization settings, described in the ingestion documentation, align with the windows your Power BI policy expects.
Author: jackey.ye | Last updated: 2026-12-03
Why a Successful Refresh Doesn't Prove the Filter Ran Upstream
A refresh completes when the service has loaded every partition it was asked to load. It says nothing about where the date filter ran.
The service does not send your Desktop parameter values to the source. With incremental refresh, the service creates incremental refresh and historical partitions on first refresh, then overrides the parameter values to filter and query data for each partition based on the date/time values for each row. One query is generated per partition. If those queries fold — or if the source query already carries the date range, as a native query can — the endpoint receives a bounded predicate and returns only the partition window. If they don't, the refresh still finishes, but the Power Query engine has to filter locally, and how much it pulls depends on the query: a poorly bounded source query can drag back far more than the window implies, sometimes the whole table, though the exact volume is a property of your query rather than a fixed rule.
Microsoft's own configuration guidance gives the practical tell: if loading the filtered period "seems slow and process-intensive, it's likely the query isn't folding." The troubleshooting article is more explicit — when queries aren't folded and data isn't filtered at the source, "the engine then attempts to filter the data" — and it recommends confirming folding in Power BI Desktop before publishing, because folding problems "can be significantly compounded" in the service.
Two consequences follow. First, a slow refresh is a symptom, not a diagnosis; you need to see the emitted statement. Second, the cost is invisible in the refresh history, which reports success either way. The remaining sections give you the evidence to tell a bounded query from an unbounded one.
Import Incremental Refresh vs. Direct Lake vs. DirectQuery at a Lakehouse
Only Import mode uses RangeStart/RangeEnd partitions, so only Import mode has a partition filter that can fold — or, alternatively, travel inside a bounded native query. Direct Lake has no model table partitions to fold into, and DirectQuery sends a query per visual rather than per partition.
Behavior at a lakehouse SQL analytics endpoint | Import with incremental refresh | Direct Lake | DirectQuery |
|---|---|---|---|
Uses RangeStart/RangeEnd incremental partitions | Yes — the service creates incremental refresh and historical partitions on first refresh and overrides the parameter values per partition (overview) | No — "partitioning can be done at the Delta table level" (Direct Lake overview) | No — no model table partitions |
What a refresh does | Replicates data into an in-memory copy of the model | Copies only metadata ("framing"): analyzes the latest Delta table metadata and updates references to the latest files in OneLake, typically in seconds | No data copy; queries run against the source at query time |
Is the partition filter a Power Query folding concern | Usually yes — folding is the default path, but a bounded native query with embedded parameters can also work in pure Import | No — there is no RangeStart/RangeEnd filter step to fold | Folding, or a query the source still bounds, is required for the table's query rather than per partition |
Documented behavior worth knowing | Partitions can also be created manually through the XMLA endpoint (advanced incremental refresh) | For Direct Lake on SQL analytics endpoints, a table based on a non-materialized SQL view "will fall back to DirectQuery", while Direct Lake on OneLake doesn't support tables based on non-materialized SQL views (Direct Lake overview); RLS or OLS at the endpoint and Delta guardrail breaches can also trigger fallback (how Direct Lake works) | Every visual interaction re-queries the source; the service caches some results (DirectQuery in Power BI) |
Read the table as a scoping device: the diagnostic steps below apply to the Import column only. If you are still deciding which column you should be in, the storage-mode trade-offs — freshness, model size, licensing, governance — are covered in Power BI Direct Lake vs Import vs DirectQuery; this article does not repeat that comparison.
Prerequisites Before You Start Diagnosing
You need a working incremental refresh configuration before you can diagnose one. Confirm each item below; a missing item usually explains a failed check later.
A Fabric lakehouse with a SQL analytics endpoint. Every lakehouse provisions one automatically; it is a read-only T-SQL surface over the Delta tables, running on the same engine as the Fabric Data Warehouse (SQL analytics endpoint).
A semantic model in Import mode with an incremental refresh policy defined on the table you are testing. A policy is defined in Desktop but only takes effect after you publish and refresh in the service.
A supported capacity and an awareness of refresh time limits. Incremental refresh is supported on Premium, Premium per user, Pro and Embedded (incremental refresh overview). Pro models still have a two-hour refresh limit and Premium capacities a five-hour limit unless the refresh runs through the XMLA endpoint — incremental refresh reduces the data per refresh but does not lift those ceilings.
A confirmed current-date/time basis. The service works out "today," and therefore the refresh window, in UTC by default; you can set a different time zone under the model's Refresh settings. A late-evening local refresh can therefore fall on the next UTC day unless you adjust the time zone.
RangeStart and RangeEnd parameters, typed Date/Time. The names are case-sensitive, and the type must be Date/Time "regardless of the data type of the date column" (configure incremental refresh).
A date column on the source table that the filter step targets, of date/time type or an integer surrogate key in
yyyymmddform. Ownership of that pipeline matters: if the table is populated by a platform other than Fabric, confirm what your ingestion layer writes into the date column, since the ingestion documentation for a separate lakehouse product such as Singdata Lakehouse Studio describes its own ingestion behavior, not the Fabric endpoint's.Power BI Desktop with Query Diagnostics available, plus the query folding indicators if you work in Power Query Online (indicators are available only there, per Query folding indicators).
For partition inspection: a workspace on a Premium capacity with XMLA endpoint access, and SSMS or Tabular Editor. Microsoft states plainly that model table partitions "aren't visible and can't be managed by using Power BI Desktop or the Power BI service" outside that path (advanced incremental refresh).
Read access to
queryinsightsviews on the endpoint for the history check. Full query text is visible to Admin, Member and Contributor roles (query insights).A single data source for every partition. All partitions, Import or DirectQuery, must query data from one source, so a table that stitches together multiple sources cannot be incrementally partitioned (incremental refresh overview).
One caution before you publish: republishing the same model from Desktop removes existing partitions and data already in the model. If you need to change metadata after publishing to a Premium capacity, use ALM Toolkit or TMSL instead of republishing.
What the Policy Settings Ask the Endpoint to Fetch
Before you can prove the boundary reached the source, you need to know what the policy asked for, because the policy is what turns your two Desktop parameters into per-partition queries. The policy has two required settings and several optional ones, and each one changes the date window the endpoint should receive.
The archive period ("Archive data starting before refresh date") is the historical store period. Rows within it are loaded into the model in the service, plus the current, incomplete historical period up to the refresh period. Set it to five years and the table keeps the last five whole years as historical partitions in coarser units, alongside finer refresh partitions — the rolling window pattern where older partitions merge and, once outside the archived range, drop out of the model entirely (incremental refresh overview).
The refresh period ("Incrementally refresh data starting before refresh date") is the window refreshed every run. Microsoft illustrates it with a three-day window over a table averaging 10,000 new rows a day, which it expects to refresh roughly 30,000 rows. Treat 30,000 as an illustrative figure from that specific example, not a test you can apply to your own table: late-arriving changes, source-side updates and deletes, and uneven daily volume all move the count. If your refresh lands far above what the window plausibly covers, you have a reason to look at the emitted query — not proof on its own that folding broke.
The optional settings change how selective that window is. Only refresh complete days restricts the refresh to completed calendar periods. Microsoft's examples are whole days and whole months: a 4:00 AM refresh ignores rows that arrived between midnight and 4:00 AM, because the day isn't finished, and a one-month period scheduled for the twelfth of the month refreshes the previous month only after that month is fully closed. This setting is optional unless you enable real-time data, and refresh timing is still evaluated in UTC unless you configure a different time zone.
Get the latest data in real time with DirectQuery adds a DirectQuery partition for rows newer than the refresh window. It is available for Premium, Premium per user and Power BI Embedded models, and a model using it can only be published to a Premium workspace. This optional partition also tightens the query rules: once real-time data is in the policy, nonfolding transformations can't be used, so the query must either fold or bound the results at the source itself.
Detect data changes is the most useful for cost and the easiest to misread. You nominate a date/time column, typically an audit or last-modified column, that is not the partitioning column. Each refresh compares that column's maximum value per period and skips periods where it hasn't moved. Two caveats matter for lakehouse sources: the column is persisted in memory, so high-cardinality audit columns add model size, and only soft deletes are detected — a row physically removed at the source is not seen (configure incremental refresh).
One filter rule deserves its own line because it produces silent duplicates rather than silent slowness: the RangeStart/RangeEnd filter must use = on only one boundary. A predicate like [OrderDate] >= RangeStart and [OrderDate] <= RangeEnd lets a row satisfy two partitions and land twice in the model, so pair >= with <, or > with <=.
What Happens on the Initial Refresh
Applying the policy in Desktop loads no data. The first refresh after publishing is the expensive one: the service creates the historical and refresh partitions, loads the whole archive period plus the refresh window, builds relationships and hierarchies, and recalculates objects. Microsoft recommends running it as an individual refresh so you can watch progress. Every later refresh only processes the refresh partitions, though merging and recalculation still occur (incremental refresh overview).
That first refresh is also where a missing boundary does the most damage, because it exercises the full archive range. If the partition queries aren't bounded at the source, the initial load can be far heavier than the policy implies — the same problem that makes later refreshes slow, concentrated into one run.
Step-by-Step: Prove the Partition Filter Reached the Endpoint
Work the steps in order. Each has an expected outcome; if a step fails its checkpoint, stop and fix it before continuing, because later evidence becomes ambiguous.
Confirm the parameters and the filter step. In Power Query Editor, open Manage Parameters and verify
RangeStartandRangeEndexist with type Date/Time. Then locate where the query bounds the date column — a filter step for a folded query, or the SQL itself if you're using a native query. Verify: both parameters are Date/Time and the query references them on the date column. If the parameters are typed Date or the column is text, folding is already at risk.Inspect the query the source receives. Right-click the filter step and choose View Native Query (or View data source query, depending on the connector). Microsoft notes availability depends on the connector (query folding basics). If you built a native query yourself, read its SQL directly. Verify: the statement contains a
WHEREpredicate on the date column referencing the parameter values. If the option is greyed out and your SQL has no date bound either, the boundary is missing — go to the failure-mode section rather than continuing.Run Query Diagnostics and read the most specific query. Start diagnostics, refresh the query, stop, and open the detailed view — this catches the case where the boundary is applied in more than one place. The point is to see "the most specific query or queries that Power Query sends to the back-end data source" (Query Diagnostics folding). Verify: the most specific emitted statement carries the date range. A bare
SELECTof all columns with no date predicate means the filter ran locally.Handle integer surrogate keys correctly, if that is your schema. You typically can't convert
yyyymmddintegers to Date/Time without producing a non-folding expression. Instead, create a function that converts the Date/Time parameter values to match the integer key, and call that function inside the filter step (configure incremental refresh). Verify: repeat step 2 — the native query shows the converted integer bounds, not a row-by-row conversion.Publish, run the initial refresh, then inspect partitions. Connect through the XMLA endpoint with SSMS or Tabular Editor and list the table's partitions. Verify: a refresh partition and historical partitions exist, with boundaries matching the policy's refresh and archive settings. Missing partitions mean the policy was not applied. A rough volume check still helps without XMLA, but read it as a prompt to investigate rather than a verdict: if the rows returned look wildly out of proportion to the period and to normal daily growth, that's a signal to inspect the emitted statement, since a generous result can also come from a large history window or a legitimately busy period.
Check the endpoint's query history. Query the
queryinsightsviews on the SQL analytics endpoint, for example:SELECT TOP 100 distributed_statement_id, query_hash, allocated_cpu_time_ms, label, command FROM queryinsights.exec_requests_history ORDER BY allocated_cpu_time_ms DESC; This shape follows Microsoft's documented example ([query insights](https://learn.microsoft.com/en-us/fabric/data-warehouse/query-insights)). *Verify:* the `command` text for the refresh statements includes the date predicate, and the row counts and CPU time are consistent with the partition window rather than the whole table. Because queries with the same shape share a `query_hash` even when predicates differ, open individual executions to read the actual text.
Common Failure Modes That Silently Break the Filter
Each failure below produces a refresh that completes. The symptom is what you notice; the check is what confirms the cause.
Date/Time type mismatch between parameters and filtered column. Microsoft names this explicitly: both the parameters and the filtered column must be Date/Time and the format must be the same, or "the query can't be folded" (troubleshooting). Symptom: View Native Query greyed out at the filter step. Check: compare the parameter type and the column type in the query editor.
Time-zone or format drift. A column stored in local time against UTC parameter values, or a text-formatted date, breaks the comparison the endpoint must evaluate. Symptom: the predicate appears but returns an unexpected row count. Check: compare a known day's rows in the endpoint against the model for the same window.
A non-folding step placed before the filter. Transformations that can't be translated run in the Power Query engine, and everything downstream of them stops folding (query folding basics). Symptom: the folding indicator turns to "not folding" at that step. Check: move the filter earlier and re-inspect the native query; Microsoft advises moving later steps earlier where possible (query folding guidance).
A native SQL query that leaves the date range out. A
Value.NativeQueryis not automatically fatal: Microsoft shows that for a pure Import policy you can hand-build SQL that embedsRangeStart/RangeEnd, so the range still reaches the source even though the final query doesn't fold. The real failure is a native query whose SQL has no date predicate: the range can't reach the source, so the M engine has to filter afterwards, and how many rows it pulls depends on the query rather than being a fixed whole-table fetch. This becomes a hard limit if you also enable real-time DirectQuery, because nonfolding transformations can't be used for a policy that includes the real-time DirectQuery partition — a native query that has been folded away is not the issue, the nonfolding transformation is (incremental refresh overview). Symptom: the emitted statement has no date bound. Check: read the SQL behindValue.NativeQueryand confirm it references the parameters, not just the table.A surrogate-key conversion that doesn't fold. Converting the integer column to Date/Time instead of converting the parameters to integers produces a non-folding expression. Symptom: the native query shows a conversion applied per row. Check: confirm the function is applied to the parameter values inside the filter step.
A date column that gets updated in the source. Incremental refresh "isn't designed to support cases where the filtered date column is updated in the source system"; an update is read as an insertion plus a deletion, and a deletion in the historical range isn't picked up, which can cause refresh failures from partition-key conflicts (troubleshooting). Symptom: duplicate or missing rows after a source-side date correction. Check: confirm the partitioning column is immutable in your pipeline.
Limitations and What This Method Can't Tell You
A bounded query is necessary, not a performance verdict. A predicate the endpoint evaluated proves it received the date range; it does not prove the Delta table is well laid out, that files are compacted, or that the endpoint has capacity headroom. Those are separate checks against the table and the capacity. Nor is folding the only route to a bounded query — a native query that carries the range works in pure Import but changes nothing for Direct Lake or DirectQuery.
The method also has hard scope boundaries:
It does not apply to Direct Lake. Direct Lake models have no model table partitions; partitioning happens at the Delta table level, and a Direct Lake refresh is a framing operation that copies metadata only (Direct Lake overview).
Direct Lake on a SQL analytics endpoint can change what you measure. A table based on a non-materialized SQL view falls back to DirectQuery, as can endpoint-level RLS or OLS and Delta guardrail breaches. With the default Automatic fallback behavior the query silently switches mode, so a slow result may reflect fallback rather than Direct Lake (how Direct Lake works).
Query insights has a retention window and aggregates by shape. It keeps historic query data for 30 days, and queries "are considered the same" if they have the same shape even when predicates differ, so you must drill into individual executions to read actual parameter values (query insights).
Partition inspection needs Premium capacity. Without the XMLA endpoint you cannot list partitions, which removes step 5 from the method.
Desktop verification is reliable for SQL sources, less so for others. Microsoft states that for SQL-based sources such as SQL Database, Azure Synapse, Oracle and Teradata the verification is reliable, while other data sources may require tracing the queries (incremental refresh overview).
FAQ
How do I prove the RangeStart/RangeEnd predicate reached the endpoint rather than being applied after retrieval?
Read the most specific query Power Query emits, using View Native Query at the filter step or the detailed view in Query Diagnostics; the date predicate must appear in that statement. Then confirm the same predicate in the endpoint's queryinsights history for the refresh executions. If the emitted statement lacks the date range, the filter ran locally regardless of what the refresh history reports.
Why does my incremental refresh succeed but still scan more than the window implies?
Because the refresh only reports that partitions were loaded. When the query isn't bounded at the source, the engine filters afterwards — Microsoft describes exactly this: "the engine then attempts to filter the data" (troubleshooting). How much it fetches depends on the query: some nonfolding queries pull the whole table, others return less. A slow, process-intensive load of a small period is a documented signal that the boundary didn't travel with the query — confirm it against the emitted statement rather than assuming the worst case.
Which typing or time-zone mistakes break the partition filter?
RangeStart and RangeEnd must be Date/Time, and the filtered column must also be Date/Time with a matching format; a mismatch means "the query can't be folded" (troubleshooting). For integer yyyymmdd keys, convert the parameter values to integers inside the filter step rather than converting the column, which would produce a non-folding expression (configure incremental refresh). Time-zone drift between stored values and parameter values shows up as an unexpected row count for a known day.
Does Direct Lake use RangeStart/RangeEnd, and how does it differ from Import incremental refresh and DirectQuery?
No. Direct Lake models have no model table partitions; partitioning can be done at the Delta table level, and a refresh copies only metadata (framing) rather than data (Direct Lake overview). Import incremental refresh creates partitions the service manages and overrides the parameters per partition, so the boundary can ride in a folded filter or a bounded native query. DirectQuery copies nothing and queries the source at query time, so the table's query itself must bound the results rather than relying on a per-partition filter.
Which Power Query steps silently invalidate folding?
Any transformation the source can't perform stops folding from that step onward — the documented example is Capitalize Each Word, which never folds, while everything before it still does (Query folding indicators). A native SQL query is a different case: it can work for a pure Import policy if you embed RangeStart/RangeEnd in the SQL yourself, and the restriction that applies when the policy includes the real-time DirectQuery partition is on nonfolding transformations, not on native SQL as a class (incremental refresh overview). Use the folding indicators or the native query view to find the first step that breaks the chain.
For a related implementation check, see the DAX and model performance diagnostic guide.