Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SaaM
Helper II
Helper II

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

 

1 ACCEPTED SOLUTION
edhans
Super User
Super User

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. 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

1 REPLY 1
edhans
Super User
Super User

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. 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors