<\/figure>\n\n\n\n2. Load Data:<\/strong> You can now use the Query Editor to perform any edits you want. Click Transform Data,<\/strong> and you will be redirected to the Query Editor.<\/p>\n\n\n\n <\/figure>\n\n\n\n3. Perform Transformations:<\/strong> Once the Query Editor opens up, you can perform transformations and push them into the data source. It could be as simple as sorting the rows of a particular column in ascending order, as shown below:<\/p>\n\n\n\n <\/figure>\n\n\n\nYou can also perform a more complex transformation, such as adding a conditional column. Go to Add column<\/strong> and click on Conditional column<\/strong>. After that, add a condition as shown below:<\/p>\n\n\n\n <\/figure>\n\n\n\n4. Apply the Transformations: <\/strong>On the Home <\/strong>tab, click Close & Apply<\/strong> to load the data onto Power BI. You can also repeat the process for any column on which you want to perform query folding.<\/p>\n\n\n\nTransformations that Support Query Folding<\/h2>\n\n\n\n Some of the most common transformations that support query folding are: <\/p>\n\n\n\n
\nRemoving or renaming columns<\/li>\n\n\n\n Merging foldable queries that are based on the same source.<\/li>\n\n\n\n Appending foldable queries based on the same source.<\/li>\n\n\n\n Numeric calculations<\/li>\n\n\n\n Joins<\/li>\n\n\n\n Pivot and unpivot<\/li>\n<\/ul>\n\n\n\nThese are only a few examples, and there are numerous additional transformations that support query folding. However, it’s important to note that even though the SQL source is capable of supporting query folding, this does not guarantee that your query will actually fold.<\/p>\n\n\n\n
The transformations that do not support query folding include: <\/p>\n\n\n\n
\nMerging or appending queries that are based on different sources. <\/li>\n\n\n\n Using some functions while adding custom columns that do not have a counterpart in SQL. <\/li>\n\n\n\n Adding columns with complex logic. These refer to functions that do not have equivalent functions in the data source.<\/li>\n<\/ul>\n\n\n\nTypes of Query Folding<\/h2>\n\n\n\n There are three ways a query folding statement could go: <\/p>\n\n\n\n
1.\tFull query folding:<\/strong> All your transformations are pushed to the source, and processing occurs at the Query engine accordingly. <\/p>\n\n\n\n2.\tPartial query folding:<\/strong> This happens when only a part of your transformations is pushed back to the source. Therefore, a part of the processing occurs in the query engine. This is sometimes used when performing some steps that prevent query folding.<\/p>\n\n\n\n3. No query folding:<\/strong> This might happen when the Query has transformations that cannot be translated to the language of the data source. This could be because the connector cannot support query folding or the transformations are not supported. Therefore, the Power Query, in this case, gets the raw data and uses the Power query engine for processing.<\/p>\n\n\n\nQuery folding compatible sources<\/h2>\n\n\n\n Some of the data sources that support query folding are given below:<\/p>\n\n\n\n
\nOData feeds<\/li>\n\n\n\n SharePoint Lists <\/li>\n\n\n\n Web services<\/li>\n\n\n\n DirectQuery capable sources like Azure Synapse Analytics, Azure Data Lake Storage, and Azure SQL Data Warehouse<\/li>\n\n\n\n Exchange<\/li>\n\n\n\n HDFS, Folder.Contents, Folder.Files<\/li>\n<\/ul>\n\n\n\n