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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
dhruv_-_
New Member

SQL Direct Query Error

Hi all,
I’m using SQL Server with DirectQuery, and after adding new columns to some tables, Power BI started showing:
“Invalid column name” for the newly added columns.
What’s strange is:
  1. The new columns appear correctly in Power Query
  2. Refresh fails only in DirectQuery
  3. Import mode works without any errors
  4. If I delete all tables and reconnect the DB from scratch, and re-write all the measures it works again
  5. The same PBIX works on one colleague’s laptop but fails on another
Schema is identical across environments.
Any idea how to fix it without rebuilding the whole model?
Thanks!
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @dhruv_-_ ,

Try these before rebuilding to fix the issue.

 

1. clear file-specific cache.

 

File → Options → Current File → DirectQuery → Clear cache

 

Restart again.

 

2. Disable SQL Server folding cache

 

Go to:

 

File → Options → Global → Preview Features

Disable:

 

Improved model metadata

 

DirectQuery query reduction (if enabled)

 

Restart Power BI.

 

3. In Model View, for each affected table:

Select table,

 

Click Refresh in the Properties pane (this is a metadata refresh, not data refresh)

 

OR

Remove one column and add it back (forces schema reload).

 

4. In Model View, for each affected table:

Select table

Click Refresh in the Properties pane (this is a metadata refresh, not data refresh)

OR
Remove one column and add it back (forces schema reload).

 

5. Ensure all machines use the same Power BI Desktop version

 

Some versions had DirectQuery metadata bugs.

 

If my response as resolved your issue please mark it as solution and give kudos.

View solution in original post

7 REPLIES 7
v-priyankata
Community Support
Community Support

Hi @dhruv_-_ 

Thank you for reaching out to the Microsoft Fabric Forum Community.

@Kedar_Pande @Anonymous @kushanNa @Praful_Potphode Thanks for the inputs.

I hope the information provided by users was helpful. If you still have questions, please don't hesitate to reach out to the community.

 

Hi @dhruv_-_ 

Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.

Praful_Potphode
Super User
Super User

hi @dhruv_-_ 

try changing the column name to something unique and then try.If this works, then there could be chances that you have renamed the column directly in desktop and its conflicting with it.

another option you can try is uncheck Enable Data load option in power query and close and apply.this will remove the table from desktop.then again check the Enable Data load option in power query and close and apply.

 

Please give kudos or mark it as solution once confirmed.

 

Thanks and Regards,

Praful

Thanks and Regards,
Praful Potphode
LinkedIn-https://www.linkedin.com/in/praful-p-912349241/
kushanNa
Super User
Super User

Anonymous
Not applicable

Hi @dhruv_-_ ,

Try these before rebuilding to fix the issue.

 

1. clear file-specific cache.

 

File → Options → Current File → DirectQuery → Clear cache

 

Restart again.

 

2. Disable SQL Server folding cache

 

Go to:

 

File → Options → Global → Preview Features

Disable:

 

Improved model metadata

 

DirectQuery query reduction (if enabled)

 

Restart Power BI.

 

3. In Model View, for each affected table:

Select table,

 

Click Refresh in the Properties pane (this is a metadata refresh, not data refresh)

 

OR

Remove one column and add it back (forces schema reload).

 

4. In Model View, for each affected table:

Select table

Click Refresh in the Properties pane (this is a metadata refresh, not data refresh)

OR
Remove one column and add it back (forces schema reload).

 

5. Ensure all machines use the same Power BI Desktop version

 

Some versions had DirectQuery metadata bugs.

 

If my response as resolved your issue please mark it as solution and give kudos.

Kedar_Pande
Super User
Super User

  

Clear all Power BI cache (Options > Data Load > Clear cache).

Reconnect/refresh again.

@dhruv_-_

Thanks @Kedar_Pande but I have tried doing that as well but still didn't work.

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.