Power Query - does it iterate the data set for every command?

macfuller

Active Member
Joined
Apr 30, 2014
Messages
319
Office Version
  1. 365
Platform
  1. Windows
I have a performance question on how Power Query works. I'm hoping someone has an answer rather than me having to test on my 12-million row dataset and slow laptop.

If I have (say) three Table.AddColumn commands, does PQ iterate through the entire dataset 3 times, or is it "smart enough" to know it can add those three columns on a single pass?

If I were to nest the commands Table.AddColumn(Table.AddColumn(Table.AddColumn(... would that ensure PQ added the columns on a single pass?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Thanks. The article appears to be about query folding. My sources are (unfortunately?) usually flat files where it says folding doesn't take place, so I guess my situation applies to performance within PQ itself. In more general terms an AddColumn function appears to be something that can be represented in a SQL statement, so if PQ itself mimics SQL activities for its internal engine then maybe the same situation applies? I just don't know.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top