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
JWedge
Helper II
Helper II

Removing columns slowing refresh (.csv source)

Have a CSV source file pulling in just 15000 rows but over 1000 columns.  I only need a few of these so of course I remove most of them in Power Query.  Problem is it can't seem to deal with removing the columns.  If I remove a small number it takes a minute to think about it but then loads the data within 30seconds.  If I try and remove hundreds I end up giving up after half an hour of "Creating connection to model".

 

Yes I can modify the source file but really just want to know is this just to be expected or should it not be happening?  I have tried Table.RemoveColumns() and Table.SelectColumns with the same result.

 

Interestingly if I create a new query referencing the first one and then remove the columns it works quickly...

 

 

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @JWedge 

According to your description, you have a CSV file that has 15000 rows and over 1000 columns. I think it should be a huge amount of data for import mode. If you try to remove hundreds of columns in the Power query, it does take a lot of time because the transformation is operated on each column you removed. You can try to make another CSV file with the filtered files or just try the Table.Buffer() function as you said.

More info about Table.RemoveColumns() function in M language

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @JWedge 

According to your description, you have a CSV file that has 15000 rows and over 1000 columns. I think it should be a huge amount of data for import mode. If you try to remove hundreds of columns in the Power query, it does take a lot of time because the transformation is operated on each column you removed. You can try to make another CSV file with the filtered files or just try the Table.Buffer() function as you said.

More info about Table.RemoveColumns() function in M language

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

JWedge
Helper II
Helper II

Ok so I realised as I was submitting original post that I should try Table.Buffer() and it made a huge difference!

 

It appears as if the query is having to go back to the source file for every column it removes.  Can someone explain what's going on here?

 

Btw there are no complex steps in the query, literally just source, promote headers, remove columns, change types.

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.