Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I've created a R visual that load data from RData Files. Everything is working fine in desktop.
But I have problem when I upload it to the cloud, the script doesn't found the path of the files because they are in local ... obiously.
How can I solve this?
Thanks in advance!
I think you need data gateway so the service can get access to your local files
https://docs.microsoft.com/en-us/power-bi/refresh-desktop-file-local-drive
Hi @Stachu,
The problem is just with the visual.
I attach photos in case it helps to see the problem.
Hey,
as far as I understand your R script that works perfectly in your Power BI Desktop contains basically these 3 steps:
these 3 steps in one single r script will wonk in PBI Desktop.
But this will not work in the service, the reason is:
R script visuals or Custom Visuals (R based) are running in a kind of sandbox and are not allowed to access "external" ressources.
For this reason you have to split your R scipt.
The data preparation (if necessary) can either be done in the first step or also in the r script that creates the visual
This link will maybe also useful:
https://docs.microsoft.com/en-us/power-bi/desktop-r-in-query-editor
Regards,
Tom
Hi @TomMartens,
First of all, thank you for your answer.
If I put the data in my Power BI model with an R script as data source, I have a limitation in the R visual script of 150.000 rows of data isn't it?
The fact that my data is out of Power BI and I it's in my R script is to avoid that limitation.
That's the way my R script works.
As I said in Power BI Desktop everything is working fine. The problem ocurs in the service, I understand the sandbox you are talking about, but is the a way to solve my situation?
Thanks again.
Regards.
Hey,
okay now it becomes clearer ...
Unfortunately there is this data point limit of 150000.
If you can't "compress" the number of data points there will be no solution.
Once I had been challenged with a similar problem ...
Lets assume your dataset looks like this
A | this | 1
A | this | 1
A | that | 2
I prepared the dataset that I passed to the R script visual in this way (I collapsed the dataset)
A | this | 1 | 2
A | that | 2 | 1
Inside the R script visual I then "expanded" the dataset again. I used the R package data.table for the collapsing and also for the expansion.
if you have to "visualize" more than 150000 datapoints at the same time, also considering filtering the dataset / the dataframe by Power BI Slicer and you are not able to collapse the dataset/dataframe that is passed to the R script visual, there is no solution - unfortunately.
Regards,
Tom
Hi Tom,
Thank you very much for your answer.
So I think for the moment the only solution in to make it work in Power BI Desktop.
Do you know if you can manage permisions in the desktop ? I don't want user to be able to manipulate data for example...
Regards.
Hey @luxpbi
I'm jumping over to this thread as I saw you opened a new question specific to getting this working in the service. Tom's idea to collapse and expand is really neat. I also wanted to ask, is your R visual performing any aggregations that you could perform in your data model before importing into the visual?
Thanks,
Parker
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |