This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowThe Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more
I have applied incremental refresh and it's working fine, however my question is there anyway to push the applied steps to the database ?
let
Source = Sql.Database(xxxxxxxxx),
#"Navigation 1" = Source{[Schema = "xxxxxx", Item = "xxxxxxx"]}[Data],
#"Filtered Rows" = Table.SelectRows(#"Navigation 1", each [report_week] >= RangeStart and [report_week] < RangeEnd)
in
#"Filtered Rows"
Solved! Go to Solution.
Hi @powerbidev123 ,
No, Power BI doesn't write the Power Query transformations back to the source database.
What can happen is that, through query folding, Power BI pushes supported operations down to SQL Server so they are executed there during refresh. Your RangeStart and RangeEnd filter is usually compatible with query folding.
You can verify whether it's folding by checking View Native Query.
ref- https://learn.microsoft.com/en-us/power-bi/guidance/power-query-folding
If you need the transformation logic to live in the database, you'd need to create it as a view, stored procedure, or similar database object.
Hope this helps!
Hello @powerbidev123,
If you are asking regarding Power BI Incremental Refresh, the short answer is NO. The applied steps in Power Query are not written back to the SQL database. But, the Sql.Database folding is ON by default, and your current steps should already be folding fine.
How to check if a step is folding:
Right-click on the step (e.g. "Filtered Rows") in the Applied Steps pane --> "View Native Query".
For your specific query:
So this should already be pushing down as something like:
SELECT * FROM xxxxxx.xxxxxxx
WHERE report_week >= @RangeStart AND report_week < @RangeEnd
Things that will silently break folding if you add more steps later:
After every step you add, spot-check "View Native Query" to catch the exact point where folding breaks. It's much easier to fix one step than to hunt through the whole query later.
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
Query folding already handles this. Since your source is Sql.Database and the only step after navigation is a simple filter on RangeStart/RangeEnd, that filter folds back into the SQL query automatically. Power BI generates a WHERE clause against the source, so the database only returns rows in range instead of pulling the whole table.
Hello @powerbidev123,
If you are asking regarding Power BI Incremental Refresh, the short answer is NO. The applied steps in Power Query are not written back to the SQL database. But, the Sql.Database folding is ON by default, and your current steps should already be folding fine.
How to check if a step is folding:
Right-click on the step (e.g. "Filtered Rows") in the Applied Steps pane --> "View Native Query".
For your specific query:
So this should already be pushing down as something like:
SELECT * FROM xxxxxx.xxxxxxx
WHERE report_week >= @RangeStart AND report_week < @RangeEnd
Things that will silently break folding if you add more steps later:
After every step you add, spot-check "View Native Query" to catch the exact point where folding breaks. It's much easier to fix one step than to hunt through the whole query later.
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
Hi @powerbidev123 ,
No, Power BI doesn't write the Power Query transformations back to the source database.
What can happen is that, through query folding, Power BI pushes supported operations down to SQL Server so they are executed there during refresh. Your RangeStart and RangeEnd filter is usually compatible with query folding.
You can verify whether it's folding by checking View Native Query.
ref- https://learn.microsoft.com/en-us/power-bi/guidance/power-query-folding
If you need the transformation logic to live in the database, you'd need to create it as a view, stored procedure, or similar database object.
Hope this helps!
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 25 | |
| 20 | |
| 20 | |
| 20 | |
| 20 |