Microsoft’s Power BI provides a robust set of built-in visuals for displaying data in your reports and dashboards. However, no matter how many visuals are built in (or how flexible they may be) there may come a time when you wish to do something completely custom.
Luckily, Power BI provides the ability to write custom visualizations (here’s an example).
Custom visuals allow the creator full control over how the data should be visualized and also have the ability to display whatever formatting options are available for the user to customize. Just as an example, perhaps the default radial gauge provided is too vanilla. Maybe you want it to be more visually appealing or to provide some additional features. With Power BI’s custom visuals, one could hypothetically design their own custom gauge control, such as this one provided by CloudFronts Technologies:
This is just one example, but it demonstrates the potential that writing one’s own visual has – both in terms of communicating relevant info and for general aesthetics.
Microsoft has created a fairly barebones tutorial that walks through the process of writing custom visualizations with Power BI, and in this article I will provide some comments and insights to supplement it.
So, Let’s Get Started
Notice that the Microsoft tutorial makes use of NodeJS and npm (Node Package Manager). As Microsoft continues to embrace the open source world, many of their new tools are being hosted and distributed via popular channels for open source libraries.
Microsoft’s Power BI Visual Tools is one such project. This toolset, utilized via a command line utility such as PowerShell or a simple Command Prompt, provides users the ability to stand up the basic scaffolding of a Power BI custom visual project to begin development on. With the scaffolding in place, users can begin creating new custom visuals and running them for debugging.
This project can be managed with whatever IDE or source code editor you prefer, but in keeping with the open source theme, you may want to consider Visual Studio Code.
Final Notes (Sharing is Caring)
Now that history class is over, we can look at a few noteworthy aspects as it pertains to custom visuals within PowerBI.
- As you make changes to your custom visual project, you can build and run it locally.
- Within Power BI’s online service, you can host your custom visual and test/debug it.
- When the visual is fully developed, you can package it up so that it can be shared with others and imported into their Power BI projects. You can also publish your custom visual to Microsoft AppSource so that it may be shared widely. Currently only free sharing of custom visuals is allowed (things could get interesting if that changes).
- Given the aforementioned sharing, the AppSource can be a great resource for grabbing visuals others have created that may be of use.
Thanks for reading! We hope you found this blog post to be useful. Do let us know if you have any questions or topic ideas related to BI, analytics, the cloud, machine learning, SQL Server, (Star Wars), or anything else of the like that you’d like us to write about. Simply leave us a comment below, and we’ll see what we can do!
Keep your data analytics sharp by subscribing to our mailing list!
Thanks for reading! Keep your knowledge sharp by subscribing to our mailing list to receive fresh Key2 content around data analytics, business intelligence, data warehousing, and more!
Key2 Consulting is a data warehousing and business intelligence company located in Atlanta, Georgia. We create and deliver custom data warehouse solutions, business intelligence solutions, and custom applications.