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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
naveen73
Helper III
Helper III

Error message DataFormat.Error

Hi, I have an Excel sheet and using Power Query to pull in data from an MS Access database. I build the sheet on my desktop and now want to use it on my shared drive. In "Applied Steps" I go to "source" and changed the following in the editor:

("C:\Users\myname\Desktop\filename.accdb")

to

("G:\My Drive\folder\sub-folder\subfolder\filename.accdb").

 

error_message.png

 

However, the change of the path is giving me the following error message: I am not sure why I am getting this message because all my other sheets use the path on my shared drive.

 

Please can you help?

 

Thanks,

 

Nav

4 REPLIES 4
v-jingzhang
Community Support
Community Support

Hi @naveen73 

 

I use below code to connect to an accdb file in a network shared folder and it works. Try if this works for you. 

let
    Source = Access.Database(File.Contents("\\servername\xxxx\xxxx\Test\Database1.accdb"), [CreateNavigationProperties=true]),
    _Table1 = Source{[Schema="",Item="Table1"]}[Data]
in
    _Table1

 

You could also create a new query and use Access connector to connect to the accdb file. Then open this new query's Advanced Editor and copy its path there. Use this path to replace that in old queries.

21110406.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Syndicate_Admin
Administrator
Administrator

You likely need to use this syntax to get to your network share.  Look at the mapping for your G drive to get it.

 

\\server\share\folder\subfolder

 

Pat

AlexisOlson
Super User
Super User

Can you share your whole query code (copy and paste it from the Advanced Editor)?

Hi,

 

Please see the code below (sorry, been trying to edit it but the functionality won't let me use the code style):

 

let
Source = Access.Database(File.Contents("C:\Users\NavGanpat\Desktop\FILENAME.accdb"), [CreateNavigationProperties=true]),
_Blotter = Source{[Schema="",Item="XXX"]}[Data],
#"Filtered Rows2" = Table.SelectRows(XXX, each true),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows2",{"XXX"}),
#"Merged Queries" = Table.NestedJoin(#"Removed Columns", {"XXX"}, XXX, {"XXX"}, "XXX", JoinKind.LeftOuter),
#"Expanded Static" = Table.ExpandTableColumn(#"Merged Queries", "XXX", {"XXX"}),
#"Removed Columns1" = Table.RemoveColumns(#"Expanded Static",{"XXX", "XXX"}),
#"Filtered Rows" = Table.SelectRows(#"Removed Columns1", each [XXX] < #datetime(2021, 10, 1, 0, 0, 0))
in
#"Filtered Rows"

 

Thanks,

 

Naveen

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors