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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
brunozanoelo
Post Patron
Post Patron

ERROR HRESULT: 0x80040E4E when changing SQL QUERY TYPE COLUMNS

I´ve changed all my PK columns from STRING to INTEGER, why? BETTER PERFORMANCE.

Example:
from 
PK1 || "_" || PK2 AS INTEGER) as column1
to
CAST(PK1 || PK2 AS INTEGER) as column1

PowerBI understand that the type has changed but even thought I´m receiving this crazy error.

1 ACCEPTED SOLUTION
brunozanoelo
Post Patron
Post Patron

I´ve solved this error doing the following steps:
1) Changed to an empty database (just the same structure);
2) Cleaned all the cache in menu Options;
3) Restarted PowerBI Desktop;
4) Refreshed;

View solution in original post

3 REPLIES 3
brunozanoelo
Post Patron
Post Patron

I´ve solved this error doing the following steps:
1) Changed to an empty database (just the same structure);
2) Cleaned all the cache in menu Options;
3) Restarted PowerBI Desktop;
4) Refreshed;

V-lianl-msft
Community Support
Community Support

Hi @brunozanoelo ,

 

Based on your description, this error occurs after applying the SQL query, which may be due to the data processing steps added to the query editor before. Save a copy pbix and delete all operations after connecting to the data source to see if there are errors.

 

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

amitchandak
Super User
Super User

@brunozanoelo , open edit query mode, you should see some more details . Share that

 



refer how to handle error in power query
https://www.youtube.com/watch?v=OE6DPmKqN7s
https://www.youtube.com/watch?v=9-Lag0VOiTs

 

debug issue
https://www.youtube.com/watch?v=OE6DPmKqN7s

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Kudoed Authors