Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

R scripts "Enable script visuals" to "select to enable" and back to enable script visuals loop


I have been developing R script visual for a year with no particular issues. However, since the last update I have had to click enable script visuals every time I went to the page. Since upgrading to the July 21 version, I am caught in an endless loop between the enable script visuals pop up and the select to enable (on the actual visual). 

My scripst have not changed, they work just fine in R Studio (the IDE I connected to Power BI), but they no longer render on the desktop because of this loop.


I do get a warning (but not an error) in R STudio about my ggplot2 library (4.0.3) being a slightly newer version than my R (4.0.0) As I have not upgraded either for a while (upgrading anything is difficult at my work), I take this to be a red herring.


Using Power BI desktop, (version 2.95.804.0 64-bit july 21) Has anyone else experienced this issue? Any ideas?

Frequent Visitor

This is for the benefit of anyone else who may experience similar odd behaviour. I have completed more tests to narrow down the issue and I believe the error to be spurious - it does not point at the real issue. I conclude this because one of my tests involved setting up a new pbix file from scratch and running the code in this (just this one source table and this R script, nothing else), and the visual displays just fine. There are no enable script loops and I only need to click enable script visuals once. Either my original pbix file has somehow become corrupted, or else there is interference between one of the many data sources I use and this R script. 


I guess I'll rebuild my entire data model in a new pbix.  

Hi @Esabee,

What version of power bi desktop are your report works normally before you update to the last version? Did this issue appear on other devices? I'd like to confirm if this is a specified device issue.

How to Get Your Question Answered Quickly 


Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi Xiaoxin

Thank you for your response.

I don't think it is a device issue. I have the same device as previously and have not used Power Bi on another device for a very long time (if ever). Since I described the issue here, I have started up a brand new, empty pbix file and I have tested my script in this file. The script works and visualises fine. I have since also checked some older R script visualisations on my device. It looks like the issue only affects all R scripts in this particular dashboard/pbix file.


So therefore it is unlikely to do with the device, and also nothing to do with the PowerBI version.


The only logical possible causes I can think of are that

a) my pbix file was somehow corrupted - possible, but why would it only affect my R script visualisations? All native DAX/Powerquery code visualises fine. Also why do R scripts not work on previous versions of this particular dashboard/pbix I saved? I cannot answer this because I have insufficient understanding of how the software works, but this seems strange to me.

b) an interaction with some of the data or visuals I have added to the dashboard after adding the R scripts - still testing this by bringing in one visual after the other and continuing to test if my R scripts still visualise. So far so good.

c) I may possibly have created an unusual "meta settings" environment by enabling a whole lot of development options one of which (or the interaction of which) may have caused R scripts not to visualise. I am testing this by not enabling any development options other than R scripting and so far I am still able to visualise R scripts as part of the bigger dashboard.


I am partway through rebuilding the data model and dashboard from scratch and will provide feedback should I be able to isolate the issue.


Best wishes




Hi @Esabee,

#1. Perhaps you can try to use third-party tools to connect to the power bi data model and trace them to confirm if any properties have been broken.

External tools in Power BI Desktop - Power BI | Microsoft Docs

#2. For the interaction, you can turn on the 'edit interactions' UI to simply check the visual interaction statuses:

Change how visuals interact in a report - Power BI | Microsoft Docs

#3. Did you mean the enhanced dataset metadata? If that is the case, they may change the report structure and they may not compatibility with old structures that generated on the old versions. You can also take a look at the following document it helps:

Using enhanced dataset metadata in Power BI Desktop - Power BI | Microsoft Docs


Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors