The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
Hi everybody,
I'm trying to bring my graphics from RStudio to PBI but it's giving me this error: "Can't display this visual. Make sure your R scripts results in a plot to the R default device"
I tried using dygraph and plotly , but they give me the same error. Does anyone know which R library I can use in PBI to make my graphics prettier and interactive, like this one: https://moderndata.plot.ly/interactive-r-visualizations-with-d3-ggplot2-rstudio/
Thank you!
Solved! Go to Solution.
Not an R expert by any means, but the only way I'm aware of using Plotly in Power Bi is via the custom visual. I successfully followed the instructions from the radacad blog linked below a while back. Its a much more involved process than the regular R visual, but the results are there. It does require installation of node.js as well.
http://radacad.com/interactive-map-using-r-and-power-bi-create-custom-visual-part-1
Not an R expert by any means, but the only way I'm aware of using Plotly in Power Bi is via the custom visual. I successfully followed the instructions from the radacad blog linked below a while back. Its a much more involved process than the regular R visual, but the results are there. It does require installation of node.js as well.
http://radacad.com/interactive-map-using-r-and-power-bi-create-custom-visual-part-1
Hi @CanadaMGB,
thank you so much for this material, this seems a great 'workaround' for my problem. Guess I'm gonna have to create a custom visual whenever I want to plot interactive R graphs. 😄
Hopefully, PBID team will make the R chart option suport more R libraries in the future.
Best,
I.A.
I'm posting in this old thread for the benefit of people googling for this stuff (or in Microsoft's fantasy universe, "binging").
The Power BI documentation sounds a bit arcane if you're not versed in R. When they talk about the "R default display device", what they mean is that "regular" R charts will only work with R packages that generate an image (typically PNG). As you found out, it's only by creating a custom R chart that you can work with R packages that generate HTML, which is how the interactive ones work (e.g. Leaflet).
This can be confusing when the same code that works in Rstudio fails in Power BI. But PBI does give you a clue in its error message, telling you that "No image was created. The R code didn't result in creation of any visuals".
For reference, see known limitations here:
https://docs.microsoft.com/en-us/power-bi/desktop-r-visuals
Hi!
This thread is now somewhat old, but I think still valid.
I am trying to create a gauge with R based on flexdashboard.
The goal for this is to have a gauge chart, to which the colour changes depending on the %.
This example workd in Rstudio
https://rdrr.io/cran/flexdashboard/man/gauge.html
But not in PowerBI 😞
Can it be that flexdashboard generates something dynamic, where PBI is expecting something fix? If yes, what would be the workaround?
Cheers. G.
@Ghuiles only some R libraries are supported in Power BI:
https://docs.microsoft.com/en-us/power-bi/service-r-packages-support
@Anonymous,
>>"Can't display this visual. Make sure your R script results in a plot to the R default device."
For this issue, please check if the information on the link below helps or not.
http://community.powerbi.com/t5/Issues/R-visuals-with-the-DiagrammeR-package-don-t-work-in-Power-BI/idi-p/174131
Regards,
Charlie Liao
That thread doesn't really answer my question. But thanks anyways.
User | Count |
---|---|
161 | |
111 | |
96 | |
87 | |
75 |
User | Count |
---|---|
158 | |
136 | |
133 | |
81 | |
61 |