Forum Discussion
Add SQL statements in advanced window or rebuild in M
If you are using advanced window to run the SQL, some of the features like query folding can't be achieved.
But I always go with it because I know my SQL is right, tune it, bring in only the necessary columns and rows etc.
All I do in M query is to select the datatype and/or add custom/conditional columns for sorting,grouping etc..
On the flip side, If yo do it with M query, it has to read all the rows and transform the data in the way you need in Power BI.
But is it a "Best practise", I don't know. Test both the approaches and see which one loads faster.
If this helps, mark it as a solution
Kudos are nice too.
- gramespa6 years agoFrequent Visitor
Thank you for sharing you opinion in this! Since data size is not an issue in this case i might go for the advanced window and be sure what i am doing is correct.