Forum Discussion
R script visual not working in Service
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.
- Load data
- Prepare data
- Pass parameters with Power BI (the idea is that the script will change with the inputs of the users)
- Create the visual
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
- luxpbi8 years agoHelper V
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.
- Anonymous8 years agoNot applicable
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