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
jchahal
New Member

Column "XX" not found.

I have read on this issue on a few posts and tried to solve it by removing the error from Advanced Editor, but I keep getting the same error. Initially it was saying "column 21" not found. I deleted all the other columns from the source table and also column 21 from my powerbi model. Now, it's saying column 9 not found? 

 

It's frustrating because all those empty columns hold no data

 

jchahal_0-1712857269743.png

 

jchahal_1-1712857290301.png

 

 

5 REPLIES 5
jchahal
New Member

I am hoping someone can still help me with this. 

v-cgao-msft
Community Support
Community Support

Hi @jchahal ,

Could you attach the query from the advanced editor to the reply in text format? That would be very helpful.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

AnalyticsWizard
Solution Supplier
Solution Supplier

@jchahal 

It sounds like you're experiencing a frustrating issue with missing columns when loading data into Power BI. This type of error typically arises when Power BI expects a column that is either not present or incorrectly referenced in the source data or within the query itself. Here’s how you can troubleshoot and hopefully resolve the issue:

 

1. **Check the Source Data**: Ensure that the source data still includes the columns that your Power BI query references. If the column structure of your source data has changed (like removing or renaming columns), you will need to update your Power BI queries accordingly.

 

2. **Refresh the Query in Advanced Editor**: Open the Advanced Editor from the Home tab in Power Query Editor. Review the M code to see if there are any steps specifically referring to column indices that no longer exist. Columns in M code are often referred by their position, like `Column1`, `Column2`, etc., which can lead to errors if the data structure changes.

 

3. **Use Column Names Instead of Indices**: To prevent this issue in the future, modify your query to reference column names instead of column indices. This way, if the order of columns changes, it won’t impact your queries. You can do this in the Advanced Editor by replacing column indices with the actual column names.

 

4. **Error Handling**: Implement error handling in your Power Query by using the `try otherwise` structure in M code. This can help in bypassing errors related to missing data or columns, allowing the rest of your data to load successfully.

 

5. **Revert to Previous State**: If you made changes to your model or queries recently, consider reverting to a previous version where the error was not present. This might help isolate the change that caused the issue.

 

6. **Review Applied Steps**: In the Power Query Editor, carefully review each step in the Applied Steps pane. Sometimes, removing or modifying steps related to column removal or transformation can solve the issue.

Try implementing these changes and see if it resolves the column not found error. If you continue to experience issues, it might be helpful to share the specific M code or a screenshot of the error and the Applied Steps pane for more targeted advice.

 

If this post helps, please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

PhilipTreacy
Super User
Super User

Hi @jchahal 

 

You're a bit light on detail and haven't provided any sample data for us to look over - makes it hard to help you.

 

You've got multiple Change Type steps in the query.  Delete these and only change the column types that are strictly needed for the query to run.

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


I apologize, Philip. Below is the entire table I pull the data from. I've just blacked out the names and client info.

 

jchahal_0-1712928266667.png

 

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.