Did you know that Power BI supports custom, interactive visualizations using the Plotly library in R? This capability is exciting, and many organizations are intrigued! We’ll use this blog post to discuss these interactive custom visualizations from a high level by discussing the benefits and tradeoffs. Anytime you make anything custom, there are always tradeoffs. Here, we discuss those tradeoffs so you can make the best decision for your organization about whether custom Plotly visualizations are right for you.

Interactive Custom Plotly Visualizations – Benefits

Interactive custom Plotly visualizations expand the capabilities of Power BI by introducing visualizations and visualization features that aren’t currently available in Power BI.


In the example, above, we’ve created a line chart visualization using Plotly and we’ve decided to put labels on the graph, but only on the first and last points of the line graph. This graph would be particularly useful to show 13 months of data overtime, where the left-most label shows January of last year, for example, and the right-most label shows January of this year, for example. The user could still view the trend across the year between both January data points.

Interactive custom Plotly visualizations are more flexible than Power BI visualizations in that you can transform the data using R before creating the visualization, so you have more options even for chart types that are available in Power BI.


In the second example, we’ve reformatted the data in R prior to creating the Plotly visualization, so we’re able to use a clustered bar chart visualization where years are displayed next to each other on the chart and data categories are on the x-axis. Power BI currently does not provide the functionality to switch between values on the x-axis and the actual clusters in a clustered bar chart. Using a standard data warehouse design, Power BI would only allow you to display data categories next to each other on the chart with years on the x-axis. This is a little confusing but the gist of it is that Plotly provides additional functionality beyond Power BI, even for chart types that are available in Power BI.

The visualizations are interactive instead of just static pictures embedded in a Power BI visualization, which is how users expect to interact with Power BI dashboards. Additionally, the interactive capabilities are similar to what is already available in Power BI but different, which means that you can provide users with the ability to interact with charts in different ways.


As I’m sure you’ve been able to see from the examples, using Plotly, the visualizations are interactive rather than static pictures of charts. Creating standard custom visualizations using Python or R creates static charts. Using Plotly, we can create a custom interactive user experience. See above for a video of additional interactive functionalities available in custom Plotly visualizations.

The syntax for creating interactive charts in Plotly using the R programming language is straight forward and simple for those who are familiar with writing code and the Plotly library is well-documented.

The R-Plotly documentation is available here. It’s well-written and provides many straight forward examples.

Interactive Custom Plotly Visualizations – Trade-Offs (Compromise)

While custom visualizations using Plotly are cool, you do need to have the technical expertise to develop and maintain these custom visualizations.

Building these custom visualizations requires you to install node.js, install pbiviz and interact with it in the command prompt, download and modify a package for deployment from Microsoft’s GitHub, and write an R script to transform (if necessary) and create the visualization in the Plotly library. Due to all of the moving pieces, working to create a custom visualization using Plotly isn’t a great first exercise in learning R, because there are so many necessary components that can trip up a first-time R-coder, resulting in frustration.

Coded visualizations in Power BI require you to account for things that Power BI would typically handle on your behalf.

For example, if the user filters the underlying dataset down to a point where there are no rows of data that satisfy all of the filter options, you have to write code to tell your R code to plot an empty visualization, otherwise, Power BI will return an error message to the user in this scenario.

Creating a visualization using code takes longer than using the drag-and-drop functionalities built into Power BI.

On average, it takes 1-2 weeks to create a custom visualization whereas it only takes minutes to hours to create a native Power BI visualization.

The interactive capabilities available in Plotly are similar to what is already available in Power BI but they are different, which can present challenges for some non-technical business users who struggle to move back and forth between a native Power BI visualization and a custom Plotly visualization.

Additionally, many of the interactive capabilities built into Plotly reveal themselves upon hovering over the visualization, which means that business users who don’t hover over the visualization may not realize that they can interact with it without some instruction or training.

The Plotly library in R expands the visualization capabilities of Power BI but you are still confined to what is possible in Plotly.

One specific limitation of Plotly is that it doesn’t have an automatic option for placing data labels directly on a chart, which means that your data labels might overlap if they are too long or too close together on the graph.

The ability to create interactive custom visualizations in Power BI is an exciting functionality that truly expands Power BI’s native capabilities, but like any custom solution, it comes with tradeoffs. If your organization is interested in exploring the interactive custom functionalities, feel free to reach out to Datalere for a free consultation. We’d be happy to discuss how custom visualizations can enhance your organization’s dashboards, adding additional value to your organization’s reporting.