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.
Yes. Chris Webb wrote about it a few years ago. https://blog.crossjoin.co.uk/2015/02/26/handling-added-or-missing-columns-in-power-query/
In your query, click on the step where you removed the column. This is probably where your error is occuring. Edit this in the formula bar in the query editor and very carefully remove the column name from the M. Then hit enter. The problem is, as Query Editor sees it, the column you are trying to remove doesn't exist.
As and example, here is a snip from one of my date tables where I removed a handful of columns:
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"DateInt", "YearKey", "HalfYearKey", "QuarterKey", "MonthKey", "MonthOfYear", "QuarterOfYear", "DayOfWeekMon", "DayOfWeekSun", "WeekOfYearISO"})
If the column "HalfYearKey" was removed from my source, this would break this step. I would remove that column, the quotes, and the comma to leave this version so that Power Query would not look for that column to remove:
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"DateInt", "YearKey", "QuarterKey", "MonthKey", "MonthOfYear", "QuarterOfYear", "DayOfWeekMon", "DayOfWeekSun", "WeekOfYearISO"})
Please let me know if I have misunderstood your request and I will try again. If possible, share your query from the Advanced Editor and let us know which column is no longer there.
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.