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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.