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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
cricks
Frequent Visitor

Error importing DBF files when MDX present

I'm trying to import the results from hyraulic simulation software into Power BI Desktop. The output from the hydraulic software is a bunch of .dbf files. I've figured out how to import .dbf files into Power BI using the code below. However, the hydraulic simulation software also generates .mdx files, which I think are an index for the .dbfs. If there are any .mdx files present at the location of the .dbf file I want to import, I get the error shown below. The only solution I've found so far is to delete the .mdx files before refreshing Power BI, which will be tedious to do every time. Can anyone help? Is there a better way to write the query so I don't get these errors?

 

let
    Source = Odbc.DataSource("dsn=dBASE Files", [HierarchicalNavigation=true]),
    Database = Source{[Name=MyPath,Kind="Database"]}[Data],
    Table = Database{[Name=MyFile,Kind="Table"]}[Data]
in
    Table

 

2021-09-02 14_02_12-PBI question - Power Query Editor.png

7 REPLIES 7
Syndicate_Admin
Administrator
Administrator

The strangest thing is that previously it did work on all machines and from one day to the next it stopped doing so. I installed the program locally on my machine with which I use Microsoft Office 365 and something similar happens to me, the error that appears when wanting to link them is, the system resources were exceeded (while the mdx is present) and in this way nobody has access to the file except me ... I don't know, it's very weird

Syndicate_Admin
Administrator
Administrator

Of course. My drawback is that DBFs are used by a very old CRM. I want to be able to link to the dbf to be able to get reports and processes, while still operating live with that application. I wouldn't be able to clear the mdx unfortunately. What continues to strike me notoriously is that a machine of the whole company can establish the link, but all the others cannot.

Sounds a lot like Access - most likely these MDX files are there for a reason, to prevent multi user access to the same database file. Might also expain why it works for one machine but not all the others.

Syndicate_Admin
Administrator
Administrator

Hello I am with the same error from several machines, except from one. I don't know how to fix it, you were able to move forward with something? Thanks a lot

My best solution was to delete the .mdx files using some Python code at the start of the query. Not ideal because the user must have Python installed, but it works. 

= Python.Execute("import os#(lf)#(lf)folderpath=r"""&Text.From(#"Model Output Path")&"""#(lf)#(lf)for parent, dirnames, filenames in os.walk(folderpath):#(lf)    for fn in filenames:#(lf)        if fn.lower().endswith('.mdx'):#(lf)            os.remove(os.path.join(parent, fn))")

 

lbendlin
Super User
Super User

Is there any chance that your hydraulics software can export a format that is a little more, uhm, contemporary?

Realized I replied to myself instead of to @lbendlin

The data is stored in a .out file, which can only be read by the software. You can check a box to export results for external use, but there is no option to specify a file type. I have suggested an option to export to another format, but I have no idea if or when they will implement it. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors