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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Dynamic update of filepath

I import a folder of Excel files into Power BI using something similar to the below

 

let
Source = Folder.Files("C:\Users\MyUsername\Box\MyFolder"),
#"Filtered Rows" = Table.SelectRows(Source, each ([Extension] = ".xlsx")),
Navigation1 = #"Filtered Rows"{0}[Content]
in
Navigation1

There can be up to 3 separate users refreshing this report in desktop and I need to be able to update "MyUsername" dynamically to the system username of the person who is updating the report.

 

Is there a way to do this?

2 REPLIES 2
Anonymous
Not applicable

I have been able to get the system username into a table through an R script, but how can I use this in the folderpath of my source?

 

image.png

Hi @Anonymous 

It seems you have different files in a folder, each file belong to a different user,

user a will update file a into power bi, user b will update file b into power bi, right?

If so, please create dynamic parameter to fetch different data source file.

Reference:

Power BI Desktop Query Parameters, Part 1

Dynamic Data Source based on parameter

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.