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
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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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