Power BI has long had the capability to include custom R charts in dashboards and reports. But in sharp contrast to standard Power BI visuals, these R charts were static. While R charts would update when the report data was refreshed or filtered, it wasn't possible to interact with an R chart on the screen (to display tool-tips, for example). But in the latest update to Power BI, you can create create R custom visuals that embed interactive R charts, like this:
The above chart was created with the plotly package, but you can also use htmlwidgets or any other R package that creates interactive graphics. The only restriction is that the output must be HTML, which can then be embedded into the Power BI dashboard or report. You can also publish reports including these interactive charts to the online Power BI service to share with others. (In this case though, you're restricted to those R packages supported in Power BI online.)
Power BI now provides four custom interactive R charts, available as add-ins:
- Time-series forecasting using the forecast package, with interactive range selection, data selection and tooltips (code)
- Time-series forecasting using the arima package, with data selection and tooltips (code)
- K-means clustering, with data selection and tooltips (code)
- Spline smoothing charts, with data selection and tooltips (code)
You can also create your own custom R visuals. The documentation explains how to create custom R visuals from HTML output, and you can also use the code on Github for the provided visuals linked above as a guide. For more on the new custom visuals, take a look at the blog post linked below.
Microsoft Power BI Blog: Interactive R custom visuals support is here!