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
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
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.