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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Pass data from another source as input to the R.Execute () function

The R.Execute () Power Query function only allows you to use R for ingesting data. Ideally, make R.Execute () more powerful by making it a data transformation function as well as data source. Let data be loaded from other sources, and then R.Execute () could be called in a subsequent step in the Power Query query. let Source = Excel.Workbook(File.Contents("C:\[...].xlsx"), null, true), Custom1 = R.Execute("df<-data.frame(Source) [...]") in Custom1 Transformations could all be done in R first, but it's slower in general, and you lose the convenience of blending data in Power BI itself.
Status: Under Review
Comments
andrea_cuneo
New Member
This is blocking for us since R doesn't support our data sources natively while Power BI does.
jabrahams
New Member
I second this idea. This would make Power Query a real winner
Imke
New Member
If I'm not mistaken we could use this functionality also to push data from Power BI to Excel. Although the ability to connect to a PBI model via Excel is great, this is a pull-mechanism and sometimes there is a requirement to push data in a table-format to Excel. There are also requirements to export more than 1.1 Mio rows - to csv or text - R could be used as a workaround for these cases. At the moment the only way to go is via a visualisation and there we're experiencing a row-limit of 150k. Folks sometimes like to use the transformations they've done in PBI (desktop!) not only in visualisations there, but also (reuse) for other tasks.
ankitpatira
Community Champion
Really great feature to have.
deldersveld3
New Member
AWESOME! It's working in Desktop!
hugoberry31
New Member
I think this feature has already been implemented. Here is an example let Source = #table({"num"},List.Accumulate({1..10},{},(s,c)=>s&{{c}})), RScript = R.Execute("df<-dataset#(lf)df$fact<-factorial(df$num)",[dataset=Source]), out = RScript{[Name="df"]}[Value] in out
fbcideas_migusr
New Member
Status changed to: Under Review