Any M transformation applied on top of a native SQL database query (via Value.NativeQuery()) will not be folded to the source system
If native SQL queries are used, such as the stored procedure examples in previous recipes, the recommendation is to embed all query steps and transformations in the native SQL query itself. If this is not possible, embed the most resource intensive operations in the stored procedure and pass filtering parameters from Power BI to the stored procedure to reduce the workload on the local M engine.