Forum Discussion
What is optimal ? Select Columns then Select rows or Select rows then Select Columns
Hello,
I was wondering what is optimal to do for my situation.
I have a table with 12k rows and 50 columns.
What is the best option ? 1 or 2 ? or another solution ?
1 - Table.SelectColumns(Table.SelectRows(Table1, (sel) => sel[item] = item and sel[line] = line), {"col1", "col2"})
2 - Table.SelectRows(Table.SelectColumns(Table1 , {"col1", "col2"}), (sel) => sel[item] = item and sel[line] = line))
with Table.SelectRows(Table1, (sel) => sel[item] = item and sel[line] = line) =>it gives me one row
Thanks
Kind regards,
Saam
You can run some tests and time it, but you'll often find it doesn't matter. Power Query will optimize the code and run some steps in a different order you put them in when it executes your steps.
1 Reply
- edhansCommunity Champion
You can run some tests and time it, but you'll often find it doesn't matter. Power Query will optimize the code and run some steps in a different order you put them in when it executes your steps.