Forum Discussion
Data loading issue_CSV_XLX
- 9 months ago
Hi Muhammadirfan20 ,
The issue you’re facing isn’t with the CSV or Excel data itself but with how Power BI is trying to load it The error message “We couldn’t connect to your DirectQuery data source or internal model” appears because Power BI is attempting to treat a flat file CSV or Excel as a DirectQuery source which isn’t supported Flat files only work in Import mode meaning Power BI must fully load the data into the model before visuals can use it.
To fix this reconnect your file using Import mode In Power BI Desktop go to Home Get Data TextCSV or Excel Workbook select your file and click Load or Transform Data This automatically uses Import mode Perform your transformations in Power Query and then click Close & Apply to load the data If you previously connected the file through a DirectQuery path such as a dataflow SQL source or SharePoint delete that query and reconnect directly to the file in Import mode.
Also check your file extension If the file ends with “xlx” instead of “xlsx” Power BI may not recognize it as a valid Excel format Open it in Excel use File Save As choose Excel Workbook xlsx and reconnect to the new file.
If the problem continues after reconnecting review the steps in Power Query Sometimes the “Changed Type” autostep causes loading errors Open Power Query Editor remove the “Changed Type” step and manually set the data types for each column If errors appear in any column rightclick it choose Replace Errors and replace them with null
For CSV files check encoding and delimiters In Power Query click the gear icon next to the Source step and verify the delimiter comma or semicolon and file origin set to UTF8 if needed.
Finally make sure the file isn’t open in Excel while loading update Power BI Desktop to the latest version and clear permissions from File Options and settings Data source settings Clear permissions before reconnecting
After reconnecting the file using Import mode and verifying that the format is correct the “Something went wrong” or “DirectQuery data source” error will no longer appear.
Thank you.
Hi Muhammadirfan20 ,
The issue you’re facing isn’t with the CSV or Excel data itself but with how Power BI is trying to load it The error message “We couldn’t connect to your DirectQuery data source or internal model” appears because Power BI is attempting to treat a flat file CSV or Excel as a DirectQuery source which isn’t supported Flat files only work in Import mode meaning Power BI must fully load the data into the model before visuals can use it.
To fix this reconnect your file using Import mode In Power BI Desktop go to Home Get Data TextCSV or Excel Workbook select your file and click Load or Transform Data This automatically uses Import mode Perform your transformations in Power Query and then click Close & Apply to load the data If you previously connected the file through a DirectQuery path such as a dataflow SQL source or SharePoint delete that query and reconnect directly to the file in Import mode.
Also check your file extension If the file ends with “xlx” instead of “xlsx” Power BI may not recognize it as a valid Excel format Open it in Excel use File Save As choose Excel Workbook xlsx and reconnect to the new file.
If the problem continues after reconnecting review the steps in Power Query Sometimes the “Changed Type” autostep causes loading errors Open Power Query Editor remove the “Changed Type” step and manually set the data types for each column If errors appear in any column rightclick it choose Replace Errors and replace them with null
For CSV files check encoding and delimiters In Power Query click the gear icon next to the Source step and verify the delimiter comma or semicolon and file origin set to UTF8 if needed.
Finally make sure the file isn’t open in Excel while loading update Power BI Desktop to the latest version and clear permissions from File Options and settings Data source settings Clear permissions before reconnecting
After reconnecting the file using Import mode and verifying that the format is correct the “Something went wrong” or “DirectQuery data source” error will no longer appear.
Thank you.
- v-tejrama9 months agoCommunity Support
Hi Muhammadirfan20 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions
Thank you.- v-tejrama9 months agoCommunity Support
Hi Muhammadirfan20 ,
I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.
Thank you.