Power BI - How to Import R Script in Power BI

in Proof of Brain2 years ago

In this post we take a look, How to Import R Script in Power BI . We looked at the how to import the OData feed into the power BI. And it was a good option for anyone who wanted to have some odata into their powerbi dashboard for some import option.

Here I am going to be importing the data and making the content through the RScript. So if you happen to have some connection to data source through the Rscript then that would be another option that you should check out.

This tutorial requires you to have a Power BI desktop version. The video below is making use of the desktop version as you are importing the local file.So this should work for the desktop version specifically and not the cloud.



First thing is opening the Power BI desktop version. And now the next thing is creating some sort of the sample RScript and then making sure to import that through the options for the rscript there.

So follow the below steps to importing the rscript.

  1. Open Power BI.
  2. Make sure you have R compiler installed.
  3. Go to the Get data> others> R script.

rs1.png

This should look something like this. And from here you would have another dialog box. That should run the script.

rs2.png

Now in order to run the script make sure to point out your desktops R version to the power BI as that is one of the option for the executing the script.

You need to make the settings for the compiler in the following path:

File > Options> R scripting

Here you get to put the path for the compiler. You can watch the video to get an idea on how to do just that. I would be just executing the sample scripts initially to test the waters.You can import the data once you are comfortable running the small script. That would give you an idea as well.

I have tested this on the Power BI desktop and you can do the same too. I would recommend you to try out the same with python script. Though I would be covering that part later. I think it'd be a good option for anyone who wants to play around with these scripts there. And it can even be used to import some large data using the scripts.


I hope that you enjoyed the tutorial. I would appreciate if you can get the subscription to my YouTube channel, you can give like, comments too. I prefer to make use of the power bi for making use of the variety of changes that we can make use of and also we have to think of importing the scripts - python and R be a good option for porting the code too. Do let me know how this works out for you.

Sort:  

Congratulations @devpress! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You made more than 800 comments.
Your next target is to reach 900 comments.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Check out our last posts:

Hive Power Up Day - September 1st 2023
HiveBuzz Women's World Cup Contest - Prizes from our sponsors