Forum Discussion
Transformations in SQL rather than Power BI but using Direct Query
- 4 years ago
jonclay If you put the SELECT statement into the Source step then any transformation step after that will break query folding and you don't want to do that. What you want to do is create Views in SQL that are based on your SELECT statements and point your query to that view. This will not break query folding when you do most transformation steps.
- 4 years ago
To follow on to what Greg_Deckler posted, you could also add the custom column in the view in SQL assuming all the data you need for the custom column is available in your database.
- 4 years ago
Creating a View is definently the way to go as Greg_Deckler .
You can though make enable query folding on top of a select statement if really need with the following: https://blog.crossjoin.co.uk/2021/02/21/query-folding-on-sql-queries-in-power-query-using-value-nativequery-and-enablefoldingtrue/amp/
jonclay If you put the SELECT statement into the Source step then any transformation step after that will break query folding and you don't want to do that. What you want to do is create Views in SQL that are based on your SELECT statements and point your query to that view. This will not break query folding when you do most transformation steps.