This tutorial shows how to use R-script to define data for Power BI Desktop. (This article describes use of R-script for Power BI publishing).

Before start, make sure you installed R.

Then go to Power BI Desktop and click on Get data / All / R script.

Then write some script resulting in Data Frame.

 

After confirmation table is loaded:

Or we can write some script containing connection to external source (for example to .csv). Practically, you will probably use it when some R-modification are needed - otherwise you can connect to .csv directly...

It can be something like this:

Again, it results in a normal table, showing table from source. 

Leave a Reply

Your email address will not be published.

*

clear formPost comment