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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
ShaWo
Advocate I
Advocate I

R script source keeps evaluating

Hi!

 

I have R script that I want to use as an source file for my report. I've created it in RStudio with an R version 4.0. It runs about 2-3 minutes in RStudio and produces the dataframe that I want. When I try to run the same script in PowerBI desktop R script source it either gets stuck on evaluating or to the message establishing connection to R (eventually timing out at 30 minutes).
The script is running post-requests to an API with different parameters (360 parameter pairs in total). If I sample only 40 parameters that I run, it seems to go through in Power BI. If I sample more than that it keeps evaluating.

 

Weird thing is that I've been able to run this same query last week without any problems.

 

What I've tried to resolve this issue:

  • Upgraded and downgraded my Power BI desktop from the latest to the may version
  • removed cache from power bi
  • installed R4.0.1, R3.5.3, R3.6, Microsoft R open 3.5.3 and tried running the script with those
  • Removed privacy level checks
  • Tried running the script in a blank Power BI file

Any ideas what I could try next?

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @ShaWo ,

 

See if this blog can help you:https://dataveld.com/2018/11/10/5-performance-tips-for-r-and-python-scripts-in-power-bi/ 

 

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

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.