cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
webportal
Impactful Individual
Impactful Individual

Keep data refreshed in Power BI Service when a dataset uses an R script

Hello,

I have a pbix file that imports a dataset from an R package (in Power Query).

It works well, but I can't keep this dataset refreshed on Power BI Service.

Data flows do not support R scripts. 

Using my personal data gateway, I get the following error in the data source credentials:

Anotação 2020-04-11 121343.png

Is there any solution for this problem, or is R incompatible as a data source for Power BI Service?

Thank You.

3 REPLIES 3
Icey
Community Support
Community Support

Hi @webportal ,

 

To my knowledge, Power BI Service supports some R visuals. Please pay attention to limitations.

 

But in Dataflow, R script is not supported as a data source currently.

 

There are some similar ideas you can vote up:

Create Dataflows using R script;

Creating Dataflows using R or Python scripts as source;

R Transform Power Query Dataflow.

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Super User
Super User

R is supported as a data source for Power BI Service. I am having issues translating the error since it is an image.

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler thanks for reaching out.

 

The data flow error message is the following:

 

Expression.Error: The import R.Execute matches no exports. Did you miss a module reference?
section Section1;
shared Query = let
  Origem = 1,
  #"Convertido em Tabela" = #table(1, {{Origem}}),
  #"Executar script do R" = R.Execute("# 'dataset' contém os dados de entrada neste script#(lf)library(tidycovid19)#(lf)covid19_dta <- download_merged_data(silent = TRUE, cached = TRUE)",[dataset=#"Convertido em Tabela"]),
  #"""covid19_dta""" = #"Executar script do R"{[Name = "covid19_dta"]}[Value]
in
  #"""covid19_dta""";

 Anotação 2020-04-11 184608.png

 

And the data gateway message:

 

Failed to update data source credentials: Tipo de excepção 'Microsoft.Analytics.Modules.R.ErrorHandling.RException.Primitives.NotValidRDataException' accionado.Hide details
Activity ID:	344d481a-c827-4527-8f9c-9b4d8f1d590b
Request ID:	98296050-66ba-2f39-459c-78fc143b82b1
Status code:	400
Time:	Sat Apr 11 2020 18:49:43 GMT+0100 (Hora de verão da Europa Ocidental)
Service version:	13.0.12739.219
Client version:	2003.3.022
Cluster URI:	https://wabi-europe-north-b-redirect.analysis.windows.net/

 

And:

Anotação 2020-04-11 185057.png

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors