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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

0

Error to Publish "R" Visual to PowerBi.com

A tried to publish a dashboard that contains "R" Visual with the following code edited. It works on power bi desktop but doesn't render on the web with the error below:

library(ggplot2)
library(plyr)
library(dplyr)
library(lubridate)

dados<-filter(dataset)

dados$Dia <- factor(dados$Dia,levels=c('Segunda-Feira','Terça-Feira','Quarta-Feira',
                          'Quinta-Feira','Sexta-Feira','Sábado','Domingo'))
myColors <- c("#00BFC4","#F8766D")
names(myColors) <- levels(c('1','0'))
colScale <- scale_fill_manual(name = "grp",values = myColors) 

ggplot(dados %>% group_by(Dia,Nome) %>% 
         count() %>%
         mutate(hoje=ifelse(tolower(Dia)==weekdays(today()),1,2 )), 
       aes(Dia,Nome, fill=as.factor(hoje)))+ 
  geom_tile(color="white", size=0.1)+
  coord_equal()+ 
  labs(x=NULL, y=NULL)+
  theme_bw()+theme(legend.position = 'none',axis.text.x=element_text(angle = 90, hjust = 0))+ 
  theme(plot.title=element_text(hjust=0))+scale_x_discrete(position = "top")+ 
  theme(axis.ticks=element_blank())+ theme(axis.text=element_text(size=15))+
  theme(legend.text=element_text(size=15))+ colScale
Spoiler

[Monitor] Loaded provider: [DnsStreamProvider] [Monitor] Loaded provider: [HttpServerStreamProvider] [Monitor] Loaded provider: [ClockStreamProvider] [Monitor] Loaded provider: [ResourceManager] [Monitor] Loaded Security Monitor Profile: [C:\Sandboxing\Sandboxes\1d6efed5-50a9-4ac6-bd0e-07f6e1733f89\Profile\0.dbconfig] [Monitor] Writable folder: [file:///Users] => [C:\Sandboxing\Sandboxes\1d6efed5-50a9-4ac6-bd0e-07f6e1733f89\Users] [Monitor] Writable folder: [file:///Results] => [C:\Sandboxing\Sandboxes\1d6efed5-50a9-4ac6-bd0e-07f6e1733f89\Results] [Monitor] Writable folder: [file:///Work] => [C:\Sandboxing\Sandboxes\1d6efed5-50a9-4ac6-bd0e-07f6e1733f89\Work] [Monitor] R/O folder: [file:///ThirdParty] => [C:\WFRoot\SBRole.1\Fabric\work\Applications\ASAzureApp_App0\temp\R_Root_13.0.1700.1812] [Monitor] R/O folder: [file:///Script] => [C:\Sandboxing\Sandboxes\1d6efed5-50a9-4ac6-bd0e-07f6e1733f89\Script] [Monitor] R/O folder: [file:///InputData] => [C:\Sandboxing\Sandboxes\1d6efed5-50a9-4ac6-bd0e-07f6e1733f89\InputData] [Monitor] Scratch folder: [C:\Sandboxing\Sandboxes\1d6efed5-50a9-4ac6-bd0e-07f6e1733f89\Scratch] [Monitor] Driver version: [1.0.2108.0] (retail build) [Monitor] Loaded package: [NT.6.2.9200.2108.0.Picoprocess (x64)] [Monitor] Loaded package: [WindowsGUI.6.2.9200.0.0.Stub (x64)] [Monitor] Loaded package: [WindowsGUI.6.2.9200.0.0.Stub (x86)] [Monitor] Loaded package: [InvokeR.exe.0.0.0.0.0 (x64)] [Monitor] Loaded package: [Windows.6.2.9200.2108.0 (x64)] [Monitor] Loaded package: [Drawbridge.1.0.2108.2108.0.Secure (x64)] [Monitor] Loaded package: [WindowsCommon.6.2.9200.2108.0 (x64)] [Monitor] Loaded package: [WindowsCertificates.6.2.9200.2108.0 (x64)] [Monitor] Loaded package: [InternetExplorerOS.8.0.7600.2108.0.IE8 (x64)] [Monitor] Launching app: [/InvokeR.exe] Error occurred attempting to evaluate the script [Monitor:WARNING] Application 'InvokeR.exe /InvokeR.exe C:\Script\0.R' exited with non-zero code 0x1. [Monitor] Done.  
Tente novamente mais tarde ou entre em contato com o suporte. Se você entrar em contato com o suporte, forneça esses detalhes.

Someone could help me please.

 

Thanks

Status: Delivered
Comments
v-haibl-msft
Employee

@RafaelRSantos

 

Could you please provide your PBIX file to us? You can share it through online file service like OneDrive.

 

Best Regards,
Herbert

Vicky_Song
Impactful Individual
Status changed to: Needs Info
 
RafaelRSantos
Regular Visitor

I can't send the file because have sensitive data. Is there a way to send the file without data?

RafaelRSantos
Regular Visitor

Hi, we change some data.

 

Follows the file as needed.

 

The problem is on page Overview_2 and Overview

 

File

v-haibl-msft
Employee

@RafaelRSantos

 

For the visual error in Overview, it should be related to package 'tidyverse'. In page of supported R packages in PBI Service, we cannot find this package.

 

For the script runtime error in Overview_2, I can repro the same issue as you. I've reported it to Power BI Team internally: CRI 36143358

I'll post here once I get any update about it.

 

Best Regards,
Herbert

Vicky_Song
Impactful Individual
Status changed to: Accepted
 
v-haibl-msft
Employee

@RafaelRSantos

 

Please try and rename 'Situação' to an English term , for example 'Situation' and see if this solves the issue.

 

 

Best Regards,
Herbert

RafaelRSantos
Regular Visitor

Hi @v-haibl-msft

 

Yeah, you solved the problem, thanks.

 

Best regards

Vicky_Song
Impactful Individual
Status changed to: Delivered
 
sheik1
New Member

Hi ,

Am facing same issue in Powerbi online .

Running R script Error could you help me out .