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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Why can't I simply remove a column?

I have a CSV file with 30 columns.  I no longer need one of the columns so I have removed it.   I then go into PBI and remove the column as well so I don't get errors when I try to refresh.

But now I'm getting errors because the column no longer exists.  I have to go into advance editor in power query and remove all traces of the column.

 

Is there a better way to remove columns?

1 ACCEPTED SOLUTION
simrantuli
Continued Contributor
Continued Contributor

Hi @Anonymous ,

 

I can't think of a better way to do it.

Guess, you will have to remove traces of it in Advanced Editor only.

 

Best Regards

Simran Tuli

View solution in original post

4 REPLIES 4
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

Steps are inter related sometimes hence you will need to remove the traces of the column you deleted.

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

simrantuli
Continued Contributor
Continued Contributor

Hi @Anonymous ,

 

I can't think of a better way to do it.

Guess, you will have to remove traces of it in Advanced Editor only.

 

Best Regards

Simran Tuli

mahoneypat
Microsoft Employee
Microsoft Employee

References to column names is one of the most common errors.  You can edit the M code as you have done, but here are two other suggestions.  

1. If you used Remove Other Columns, you can just click on the gear icon to open that dialog and close it, and it will update the M code with existing columns.

2. For some table functions, you can use MissingField.Ignore in the optional 3rd clause to ignore missing columns.

https://xxlbi.com/blog/safely-removing-columns-power-query/

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

If you have any step refering to those columns, if need to adjust them.

Also, you can clean the cache to avoid some errors.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.