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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
kpratik
Frequent Visitor

R Visual Script Execution Time out

I have added a R Visual in my report. Here is the R Script which provides the visual as a Dataframe

 

install.packages("gridExtra",repos="http://cran.us.r-project.org")
library(gridExtra)

with(dataset, {
  out_matrix <- matrix(0,nrow=nlevels(ANSWER1), ncol=nlevels(ANSWER2),
                dimnames=list(levels(ANSWER1), levels(ANSWER2)))
  out_matrix [cbind(ANSWER1,ANSWER2)] <- COUNT
#grid.table(out_matrix )
Xsq <- chisq.test(out_matrix )
pvalue <- toString(Xsq$p.value)
df <- toString(Xsq$parameter)
csq <- toString(Xsq$statistic)

x<-data.frame(csq,df,pvalue)
names(x)<-c("Chi Square","Degree of Freedom","P Value")

mytheme <- gridExtra::ttheme_default(
    core = list(fg_params=list(hjust=1,x=1,cex = 2.0),bg_params=list(fill="white")),
    colhead = list(fg_params=list(cex = 1.0),bg_params=list(fill="white")),
    rowhead = list(fg_params=list(cex = 1.0)))

grid.table(x, rows = NULL,theme=mytheme )


})

This works fine in Power BI Desktop but when I publish it and try to open in Power BI Service I only "Script Execution Time Out"

Please help

 

Power BI ServicePower BI ServicePower BI DesktopPower BI Desktop

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @kpratik,

 

I'd like to suggest you take a look at following link which told about limitations of r visual:

 

Creating R visuals in the Power BI service

Known Limitations

R visuals in the Power BI service have a few limitations:

  • R visuals support is limited to the packages identified on the following page . There currently is no support for custom packages.
  • Data size limitations – data used by the R visual for plotting is limited to 150,000 rows. If more than 150,000 rows are selected, only the top 150,000 rows are used and a message is displayed on the image.
  • Calculation time limitation – if an R visual calculation exceeds 60 seconds the script times out, resulting in an error.
  • R visuals are refreshed upon data updates, filtering, and highlighting. However, the image itself is not interactive and does not support tool tips.
  • R visuals respond to highlighting other visuals, but you cannot click on elements in the R visual in order to cross filter other elements.
  • R visuals are currently not supported for the Time data type. Please use Date/Time instead.
  • R Visuals do not display when using Publish to web.
  • R visuals currently do not print with dashboard and reports printing
  • R visuals are currently not supported in the DirectQuery mode of Analysis Services

Regards,

Xiaoxin Sheng

View solution in original post

5 REPLIES 5
Alice-Jen
Frequent Visitor

I got the same issue.
The script execution timed out, please try again later
Please try again later or contact support. If you contact support, please provide these details.
Hide details
Activity ID189db995-aeb6-4715-99a2-a45d628dca41
Request ID82b8b626-d0a7-30d0-f20b-b421bc1f8399
Correlation ID72472f60-4c19-bd91-be5e-70bc60d76016
TimeTue Nov 08 2022 09:28:43 GMT+0100 (Central European Standard Time)
Service version13.0.19403.8
Client version2210.5.10743-train
Cluster URIhttps://wabi-north-europe-q-primary-redirect.analysis.windows.net/

I have checked the R visuals in the Power BI service have a few limitations.

But I still don't know which is exact reason.

Does anyone can help me? Thanks!

Anonymous
Not applicable

HI @kpratik,

 

I'd like to suggest you take a look at following link which told about limitations of r visual:

 

Creating R visuals in the Power BI service

Known Limitations

R visuals in the Power BI service have a few limitations:

  • R visuals support is limited to the packages identified on the following page . There currently is no support for custom packages.
  • Data size limitations – data used by the R visual for plotting is limited to 150,000 rows. If more than 150,000 rows are selected, only the top 150,000 rows are used and a message is displayed on the image.
  • Calculation time limitation – if an R visual calculation exceeds 60 seconds the script times out, resulting in an error.
  • R visuals are refreshed upon data updates, filtering, and highlighting. However, the image itself is not interactive and does not support tool tips.
  • R visuals respond to highlighting other visuals, but you cannot click on elements in the R visual in order to cross filter other elements.
  • R visuals are currently not supported for the Time data type. Please use Date/Time instead.
  • R Visuals do not display when using Publish to web.
  • R visuals currently do not print with dashboard and reports printing
  • R visuals are currently not supported in the DirectQuery mode of Analysis Services

Regards,

Xiaoxin Sheng

Hi ,

I got the same issue as follows:

 

Execution Timeout

The script execution timed out, please try again later

Please try again later or contact support. If you contact support, please provide these details.Hide details
  • Activity ID189db995-aeb6-4715-99a2-a45d628dca41
  • Request IDbf19419c-ab7e-0afa-e95a-0cb9c76b086c
  • Correlation IDbc5bddef-18be-cb32-a6c1-43eb9822bed2
  • TimeTue Nov 08 2022 11:40:53 GMT+0100 (Central European Standard Time)
  • Service version13.0.19403.8
  • Client version2210.5.10743-train
  • Cluster URIhttps://wabi-north-europe-q-primary-redirect.analysis.windows.net/

     

     

     

     

    I don't know what is the exact reason. Can you help me? Thanks! 

    And my  R script as follows:

    Vertical_data <- dataset
    library(dplyr)
    library(ggplot2)
    my_vertical_data <- Vertical_data[!duplicated(Vertical_data[c('Depth')]),]
    if (!require("rLakeAnalyzer")){
      install.packages("rLakeAnalyzer")
      library(rLakeAnalyzer)
    }
    # A vector of water temperatures
    Temperature <-  my_vertical_data$Temperature
    Mean_Temp <-  mean(my_vertical_data$Temperature)
    #A vector defining the depths
    depths <- my_vertical_data$Depth
    t.d <- thermo.depth(Temperature,abs(depths), seasonal=FALSE)
    #plot(x=Temperature,y=depths,xlab = "Temp °C",ylab ="Depths(m)",xaxt = "n",width=8, height=100)
    #axis(3)
    #abline(h= -t.d, col="red")
    middle_temp  <- (min(my_vertical_data$Temperature) + max(my_vertical_data$Temperature)) /2
    t.d.show <- round(t.d, digits = 1)
    t.d.show.text <- paste0("Thermocline position:-" , as.character(t.d.show) , " m")
    ggplot(my_vertical_data, aes(x=Temperature, y=Depth)) +
     geom_point(shape=21) + scale_x_continuous(position = "top")  +
     geom_hline(yintercept = -t.d,col ="red") +
     geom_text(x=middle_temp, y=-t.d+1.5, label=t.d.show.text,col = "blue",cex =6) +
     labs( x="Temp °C", y="Depth(m)" )

@Anonymous  I am having this same issue. Is there a way to edit the visual or timeout duration so my visual will load?

Thank you. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.