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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
id013
Helper V
Helper V

Unable to Use R Visual in Service

Hi,

So I'm currently trying to create a violin plot in Power BI. It works fine in desktop but as as soon as I upload it to service it fails to render and just gives me the following: 

Script Runtime Error

An error occurred while running the script

 

In fairness this is using the most up to date version of R and I've read that the version the service runs is R 3.4.4??? The problem is none of the packages I'm using even work with that version. I've tried downgrading the version I'm using on desktop to see if I can get it work with earlier versions but the earliest version that works in desktop is 4.2.2. 

 

Package List: 

library(dplyr)
library(dbplyr)
library(ggplot2)
library(viridis)
library(grid)

Is there any other options or should I just stop using the R visual? 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@id013 Make sure that all of your libraries are supported and that you aren't using features from a library version that is not supported. All of your libraries seem to be supported but you might be using code that only works in a version that is higher than the supported version in the service.

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

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@id013 Make sure that all of your libraries are supported and that you aren't using features from a library version that is not supported. All of your libraries seem to be supported but you might be using code that only works in a version that is higher than the supported version in the service.

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

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

Sigh ok I was afraid you were going to say that. So I basically have to try re-writing my R scripts to work with the older versions of the library? Is that even possible? For example one of the dependencies for dplyr fails to install due to a compilation error.

@id013 Yeah, sorry. It's why I tend to avoid both R and Python for pretty much anything. It's a real pain in innumerable ways.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.