Configuring the Power BI service to work with R
As you learned in the The R engines used by Power BI section of this chapter, the Power BI service uses different R engines depending on whether the scripts are used in R script visuals or in Power Query for data transformation. In the first case, the engine is pre-installed on the cloud.
IMPORTANT NOTE
If the data sources of your report come exclusively from online services (e.g., Azure SQL Database) or the web, and if the R scripts in your report are used only in the R script visuals, you don’t need to install the data gateway in personal mode to refresh the datasets.
In the second case, or if at least one dataset in your report is fed from an on-premises data source or on an Azure VM, you need to install the on-premises data gateway in personal mode on any machine of your choice in order to make the Power BI service communicate with the R engine you installed on that machine.