Forum Discussion
My Power BI Custom Visual won't work
Hi!
I am trying out a simple example building a Power BI Custom visual. I followed this tutorial https://medium.com/@Konstantinos_Ioannou/how-to-create-an-r-custom-visual-html-for-powerbi-7f2d2e44e453 and every thing seems normal. But when I added my new visual inside Power BI and dragged in two fields from Fields list I got an error that won't go away. I really don't know how to fix this. I have tried many ways from reinstalling all the tools
Below you see the error inside Power BI desktop after I have dragged the custom visual into the report area and added the two fields. The script works in R Studio, but my report is failing in Power bi
Here is my rscript inside the visual studio code project:
- Anonymous6 years ago
I am not finished with finding the source of my problems.
It works in R studio and I have checked that both power bi and R studio run the same version of R. But I found a very interesting link on the web that may be shows the problem. I am checking that out now
https://community.powerbi.com/t5/Desktop/R-Visual-Rcpp-package-error/m-p/488849#M227795
Some below in that page it says:
I had yesterday the same problem. Only reinstalling (or even go back to older versions) did not help.
Only after I deleted the libraries in "<user>/documents/R" and in "<user>/library" and reinstalled R and installed the packages I needed, the problem was solved.
I think mixed package versions in <user>/library did give the problem for me. I did not know that packages were also in that directory. Only uninstall R en delete "<user>/documents/R" was not enough.
The newest version of PowerBi and R (3.5.1) are now working for me.
3 Replies
- AnonymousNot applicable
have added a link to the power bi desktop file
- AnonymousNot applicable
HI Anonymous,
According to the error message, it seems like you miss some of R packages so these script formulas not able executed on power bi desktop side. (The package 'XXX' was not installed) You can copy your code to R studio to execute to check and install all required R packages.
In addition, it looks like you are working with creating a custom visual, I'd like to suggest you post this to develop subforum to get further support.
Regards,
Xiaoxin Sheng- AnonymousNot applicable
I am not finished with finding the source of my problems.
It works in R studio and I have checked that both power bi and R studio run the same version of R. But I found a very interesting link on the web that may be shows the problem. I am checking that out now
https://community.powerbi.com/t5/Desktop/R-Visual-Rcpp-package-error/m-p/488849#M227795
Some below in that page it says:
I had yesterday the same problem. Only reinstalling (or even go back to older versions) did not help.
Only after I deleted the libraries in "<user>/documents/R" and in "<user>/library" and reinstalled R and installed the packages I needed, the problem was solved.
I think mixed package versions in <user>/library did give the problem for me. I did not know that packages were also in that directory. Only uninstall R en delete "<user>/documents/R" was not enough.
The newest version of PowerBi and R (3.5.1) are now working for me.