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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
vitaly
Advocate II
Advocate II

Working folders for R Scripts in Power BI Service

Scenario:

 

R code is using setwd() function and is used in a Power BI report. Code currently runs fine in Power BI Desktop.

 

How does setting the working folder using setwd() work in Power BI Service, given that it's a managed Azure environment with (presumably) no direct access to the file system? Is this function supported at all? If so, how to use it properly?

 

P.S. The only official documentation around this seems to be at https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-r-scripts, which says: "When setting the working directory within the R script, you must define a full path to the working directory, rather than a relative path." However, that does not address the question.

 

2 REPLIES 2
vitaly
Advocate II
Advocate II

What exactly does "According to the current information, this is impossible to achieve" mean?

 

What's "impossible to achieve"? Where is "current information" documented on docs.microsoft.com (or other authoritative Microsoft source)? Is the function itself completely unsupported within PBI Service? Or something else?

 

This function is used in R for a range of scenarios, including referencing files from a particular folder. So a whole range of scenarios rely on it and we need clarity on what PBI Service supports and does not support.

 

We are very experienced PBI Service users and have already consulted every bit of official product documentation. So please route this to the PG if a clear answer is unavailable through existing documentation.

v-henryk-mstf
Community Support
Community Support

Hi @vitaly ,

 

Hello, what kind of business needs do you need this function to achieve? According to the current information, this is impossible to achieve. So if you can provide detailed information on demand, I will try my best to answer it for you.


Looking forward to your reply.

Best Regards,
Henry

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.