This tutorial is about using of R visualization in Power BI.

To work with it, you need to download and install R – for example from this link:

https://cran.r-project.org/bin/windows/base/

We are going to work with this simple table. It was typed directly to Power BI, but you can use the same approach for any data source…

R script in Power BI visuals – super simple example

Select you are working with R. Then check both columns. You can see new (automatically created) code appears in script.

R script in Power BI visuals – super simple example

Declare you want to create a plot from data:

  • plot(dataset)

and run script. Thatˇs all. 

R script in Power BI visuals – super simple example

4 Comments

  1. How do i switch the axes? I have exactly the same code but year on the y-axis

  2. I think to switch the axes, you just need to have Year first and then Profit after that in the values section.

Comments are closed.