Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
satheesh840
New Member

Need help with automating the R code execution in power BI

Hi everyone,

 

I wrote an R function which can take values from excel file and create a plot in R. I integrated the R code in the power BI and got the 'R' plot in power BI. I want to know whether is it possible to extract the data and create a  power BI native visual instead of R visual

 

Also, I want to know whether is it possible to automate the entire process i.e when I open power BI, I should get the plot?  

 

Any help is appreciated. 

1 ACCEPTED SOLUTION

ive not done it, but i would assume yes that if you apply the script in power bi, if you run a refresh it should load everyting from the data output from 2 to the visuals





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
vanessafvg
Community Champion
Community Champion

in power query you can change the context to an rscript rather than using a power query script.  

 

Capture.PNG

 

in terms of automation, if you run this in the cloud service with a schedule i guess that is how you can automate.  If you doing it in teh desktop it would be via a manual refresh.  Is that what you asking?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thanks for the help. Now I can data and plot as power BI visual. 

 

Abou the automation, I want this way.

 

I will upload the data in either in CSV or XLS format from the local system. I want it to do the computation in R and give the output as power BI visual. 

 

Currently, I am uploading data and dragging the columns into values field. After that, I am running the R code manually. I want to know whether I can automate the entire process with a single click (of uploading the data). 

ive not done it, but i would assume yes that if you apply the script in power bi, if you run a refresh it should load everyting from the data output from 2 to the visuals





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.