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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Wing
Frequent Visitor

Interactive R custom visuals not displaying in Power BI Desktop

I tried several online tutorials on how to begin creating interactive R custom visuals (such as the link shown below), and followed all these tutorials carefully. 

 

   http://radacad.com/interactive-map-using-r-and-power-bi-create-custom-visual-part-1

 

Every thing seemed to go as expected and according to the instructions, all the way to (apparently successfully) importing the packaged .pbiviz file as a custom visual into the set of available charts visible in the visualization pane of Power BI Desktop.

 

However, when I click on the newly available custom visual icon, only a generic empty chart tile is placed on the report page. 

 

The same unssuccessful end result happens no matter which sample interactive R custom visual I tried, including the one from the sampleRHTMLVisual template, which I copied and pasted below the script.r file:

 

source('./r_files/flatten_HTML.r')

 

############### Library Declarations ###############

libraryRequireInstall("ggplot2");

libraryRequireInstall("plotly")
####################################################

 

################### Actual code ####################

g = qplot(`Petal.Length`, data = iris, fill = `Species`, main = Sys.time());

####################################################

 

############# Create and save widget ###############

p = ggplotly(g);

internalSaveWidget(p, 'out.html');

####################################################

 

 

I am fairly good with R; and have successfully implemented many R scripts to run within Power BI Desktop, and have also published them onto the Power BI Pro online service displaying static R visuals.   However, I am a relative beginner with Power BI, and have not (yet) created any custom visuals.  I'm excited about the ability to create interactive R custom visuals in Power BI. 

 
Additional info: 
  • I installed the latest LTS version (8.12.0) of Node.js on my 64-bit Windows 10 Pro computer.
  • Running 64-bit R 3.5.1 on this Windows 10 machine.
  • All required R packages are installed.

 

Would appreciate assistance to overcome this hurdle.

 

 

1 ACCEPTED SOLUTION
deldersveld
Resident Rockstar
Resident Rockstar

Have you added data into the visual's Values as well? Even though it references a sample dataset and not the Power BI data, adding data to Values should trigger the visual to appear.

View solution in original post

2 REPLIES 2
deldersveld
Resident Rockstar
Resident Rockstar

Have you added data into the visual's Values as well? Even though it references a sample dataset and not the Power BI data, adding data to Values should trigger the visual to appear.

It works now.   Thanks for the hint.   I'm off to the races making R-powered Interactive Custom Visuals !

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

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

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.