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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Downloading r scripts on-the-fly

I'm attempting to create a custom visual that downloads r scripts on-the-fly, but am running into a challenge with getting it to work in the Power BI Service.

 

I've created a custom visual based off the RHTML template that is supposed to plot a graph, but I wanted to solve for a solution where our analysts can maintain & tweak their models without having to recompile the Power BI visual.  On the desktop, this seems to work wonderfully when I add have the following code in my script.r file and modelpath is a string parameter that is the URL to my file.

#Import web file if path is defined
if(modelpath != ""){
  source(modelpath)
}

I'm able to post an r script to github and Power BI Desktop (along with R) are able to download and import the file from github.  When I attempt to use this same visual with the online Power BI service, I get the following error:

 

 

In file(filename, "r", encoding = encoding) :

  InternetOpenUrl failed: 'The server name or address could not be resolved'


Please try again later or contact support. If you contact support, please provide these details.

 

 

Does anyone have any suggestions?

0 REPLIES 0

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors