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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
bobbob123
Helper III
Helper III

Plotly using R in POWER BI

Hi all,

 

First time using R and for someone reason its seems to be a hit and miss.

 

My code is below.

# dataset <- data.frame(H, SA, MA, Year, Subject)
# dataset <- unique(dataset)

library(plotly)

fig <- plot_ly(data = dataset, x = ~SA, y = ~MA)

fig
 
 
All I want to do is plotly to display a scatter plot using x=SA and y=MA.
 
For some reason its not working. It works perfectly fine in R Studio.
 
 
 
6 REPLIES 6
v-chenwuz-msft
Community Support
Community Support

Hi @bobbob123 ,

 

Please check this limitation list if there are some limitations in your operating environment.

Learn which R packages are supported - Power BI | Microsoft Docs

 

Best Regards

Community Support Team _ chenwu zhu

 

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

VijayP
Super User
Super User

@bobbob123 

Check the details on the error statement. you should be able to know the problem statement




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


This is the message I recieve.

 

No image was created. The R code didnt result  in creation of any visuals.

 

As I've said It works on R Studio and I can run other simple scripts on Power BI using R. But I can't seem to get plotly to work.

VijayP
Super User
Super User

@bobbob123 

https://community.powerbi.com/t5/Desktop/Using-Plot-ly-with-R-in-Power-BI-Desktop/m-p/717803

This thread may help you!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


I'm not sure, I've tried to run other scripts on POWER BI it works. When I try plotly it doesn't.

Plotly requires use of Node.js to operate. PBI cannot render Plotly natively, so it needs to be 'wrapped' in Node.js to work. 

 

See link below

https://stackoverflow.com/questions/39368729/is-it-possible-to-use-r-plotly-library-in-r-script-visu...

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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