Forum Discussion
Power Query Delete or Filter First can improve the performance?
- 4 years ago
You should start with Removing the extra columns first and then perform Filtering and other operations in Power Query.
The operation which leads to reducation in size of rectangle ( i.e. grid of rows and columns) that should be done first.
Hence, if your data size is 10 rows and 6 columns, then there are 60 cells.
Scenario 1 - If you delete 2 columns, then rectangle size would be 10*4 = 40 cells.
Scenario 2 - If you are able to filter out 4 rows, then rectanble size would be 6*6 = 36 cells
Hence, in this case 2nd scenario is more beneficial.
Key rule is that you should do both i.e. reduce columns and reduce rows. Hence, if I am able to delete 2 columns and filter out 4 rows, my rectangle size would be 6*4 = 24 cells.
Now, reduce as much as possible before bringing the data to PQ. If not possible, after bringing the data to PQ, use above principles.