Posted in PowerBI, R

Getting your R script “out there” with PowerBI


PowerBI offers a really convenient way to consume the insights that are modelled by a data scientist or other analyst that is literate in R.

The problem I faced with using R-Studio was that of making it available for consumption. I would ideally want users to pull the data rather than have to push the results of a script to them. RStudio does provide a nice looking solution to this with Shiny, but it requires some work – both to setup and to learn.

PowerBI on the other hand, takes next to no time to get started, and has a very small learning curve. Your dashboard can be deployed to the cloud and consumed without being restricted by geography.

I just did the following:

I created a new model in PowerBI.

I then used the R Script option in the Get Data menu (R must be installed on your machine):


get r script

I took the script I used in the previous blog post, removed the outputs (since I’m handling that from PowerBI), and pasted it into the R Script dialogue box:


The Navigator box comes up, and turns each data frame into a data set.

Just select the dataset you want to work with and click “Load”r nav

The dataset is now available to be consumed in a PowerBI report/dashboard



Now you’ve got all the visualization niceties you need to make a quick dashboard.

I took the opportunity to take a look at the new TimeBrush visualization in the Visuals Gallery. This allowed me to make a simple line graph interactive with regards to the period:

Here’s the full data period:

fl pi

Versus 2014-2016

fl pi








I'm a Business Intelligence Developer working for a financial services company. My focus is on the Microsoft suite of BI tools.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s