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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Sowmiya
Helper III
Helper III

Export Data Using R from Power BI Service

Hi Community,

I have created table using R Script in Power Bi Desktop and I have added script to export data from R Scripted Table. It works fine and data exported to the path as I mentioned in the Script in Power BI Desktop. When I publish same report to Power Bi Service, Script Ran successfully without any error. I could not find the path where the exported data located in Power BI Service. Please do needful as earlier.

Following is my script I have used
----------------------------------------------------------------------------------------
dataset <- data.frame(ref, ref1, ref2, ref3,ref4)
dataset <- unique(dataset)
library(gridExtra)
a<-data.frame(dataset$ref,dataset$ref1,dataset$ref2,dataset$ref3)
colnames(a) <- c("Ref", "Risk Value","Title","Desc")

file<-dataset$ref4[1]
file1<-paste("~/",paste(file,".csv",sep=''),sep='')             # "~/"  it refers to default working directory (path) of R
if(dataset$Output.2[1] == "Export")
{
zz <- file(description=file1, "w")
write.csv(a, zz)
close(zz)
}
grid.table("Exported")
----------------------------------------------------------------------------------------
Thanks in Advance,
Sowmiya

 

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @Sowmiya ,

 

I am afraid that Power BI servce doesn't support it currently.

You could refer to this resolved case:

https://community.powerbi.com/t5/Service/Error-while-exporting-data-in-csv-file-using-R-script-in-po...

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-eachen-msft
Community Support
Community Support

Hi @Sowmiya ,

 

I am afraid that Power BI servce doesn't support it currently.

You could refer to this resolved case:

https://community.powerbi.com/t5/Service/Error-while-exporting-data-in-csv-file-using-R-script-in-po...

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.