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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jaryszek
Memorable Member
Memorable Member

Steps to add folder access using on-premises gateway

Hi Guys,

my query looks like:

let
    CleanPath = Text.Trim(paramLocalRepositoryPath & "/" & paramRepository),
    Check = try Table.RowCount(Folder.Files(CleanPath)) otherwise 0,
    isValid = if 
        paramEnvironment = "Remote" then true else
        if
            Check > 0 
        then 
            true 
        else 
            error " The folder path is invalid or does not exist: " & CleanPath 
in
    isValid

 

and i am getting error :
You can't schedule refresh for this semantic model because the following data sources currently don't support refresh:

  • Data source for Query1
  • Data source for Query1


So i downloaded on-premises gateway,
create new connection and point to my "cleanPath" parent folder, use Folder as data connection kind and windows auth with username and password. 

1. If this should work also for subfolders if i provided parent folder?
2. Must I create windows password for logged in user? 

Best,
Jacek

1 ACCEPTED SOLUTION
V-yubandi-msft
Community Support
Community Support

Hi @jaryszek ,

Thank you for engaging with the Microsoft Fabric Community.

1. Use the UNC path (MyFileServer\RepoRoot) instead of a mapped drive. Power Query’s Folder.Files function will then return every file in that folder and all nested subfolders, so you don’t need to register each subfolder separately.

2. Add the folder path as a Folder data source in the Manage Gateways section, and use Windows auth. If the password changes, make sure to update it in the gateway to avoid refresh failures.

 

reference: Folder.Files - PowerQuery M | Microsoft Learn

 

If my response solved your query, please mark it as the Accepted solution to help others find it easily.

And if my answer was helpful, I'd really appreciate a 'Kudos'.

 

View solution in original post

1 REPLY 1
V-yubandi-msft
Community Support
Community Support

Hi @jaryszek ,

Thank you for engaging with the Microsoft Fabric Community.

1. Use the UNC path (MyFileServer\RepoRoot) instead of a mapped drive. Power Query’s Folder.Files function will then return every file in that folder and all nested subfolders, so you don’t need to register each subfolder separately.

2. Add the folder path as a Folder data source in the Manage Gateways section, and use Windows auth. If the password changes, make sure to update it in the gateway to avoid refresh failures.

 

reference: Folder.Files - PowerQuery M | Microsoft Learn

 

If my response solved your query, please mark it as the Accepted solution to help others find it easily.

And if my answer was helpful, I'd really appreciate a 'Kudos'.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.