We are regularly asked to visualize certain data in a way that isn't possible with Power BI's standard visualizations. Of course, you can start from the AppSource marketplace You can install various additional visualizations, but you don't always find exactly what you have in mind there. Now you have the option to to program a completely new visualization But that's not an option for most of us. Fortunately, there are also good alternatives, such as Charticulator or Deneb. This article is about Deneb. Be sure to read the article about Charticulator.
Warning! Before you continue…
Before you create a report using a non-standard visualization, it’s wise to realize that support for almost every other visualization ends “at the door.” So, by using it, you’re creating a technical debt.
What is Deneb?
Deneb is a certified visualization tool for Power BI that lets you create your own data visualizations using declarative JSON syntax from the Vega or Vega-Lite programming languages.
Installing Deneb
In Power BI Desktop or the Power BI Service, click the three dots in the visual panel, select ‘Get more visuals,’ and search for Deneb. On the next screen, click ‘Add,’ and Deneb will be added to the panel as a visualization for use in your report.
How does Deneb work?
When you drag the Deneb visualization onto your canvas, a brief guide appears with links to the online documentation.
Add at least one metric and one dimension attribute to the data for the visualization, just as you would with the standard visualizations. Then, in the Header menu, click ‘Edit’ to go to the Deneb configuration.
You'll see the setup screen, where you can choose whether to use Vega or Vega-Lite. You can change this selection later. Choose a sample template, or load a template you've saved previously or downloaded from the internet.
Configuration
For this article, we’ll choose Vega-Lite and select the included ‘Interactive Bar Chart’ template.
Add the dimension attribute to the category field and the measured value to the measure field.
After completing the basic setup of the selected template, you'll be taken to the detailed configuration screen. On the left, you can choose from the specification (the template), any configuration options for it, and general visualization settings.
The Editor
On the right is an example of the visualization, with the selected data displayed below it, including metadata, any signals from the rest of the report (such as filters and slicers), and log entries generated by the Deneb render engine while processing the data and the template.
A limited portion of the layout of the final visual can be customized using the standard Power BI layout panel. There, you can also adjust the Deneb editor’s display to suit your preferences. Keep in mind that you’ll need to ‘declare’ everything else about your visual yourself. Deneb doesn’t know how you want to visualize the data, so you’ll have to define that yourself.
When you're done with the configuration, click ‘Back to report’ in the upper-left corner of the editor to return to the Power BI canvas, where the newly defined visualization is now visible.
In principle, Deneb visualizations can respond to selections made in other visualizations—just like other visualizations—through both filtering and highlighting. By default, however, this functionality is turned off. Before you enable these features for your custom visualization, it’s a good idea to the documentation on this subject to go through.
Vega and Vega-Lite
As mentioned, you define the visualization yourself using the Vega or Vega-Lite programming languages. These are descriptive languages that use JSON syntax. This means that you define what the final result should look like in JSON format. Deneb then handles the actual visualization.
It would go beyond the scope of this article to discuss all the features that Vega and Vega-Lite offer. Extensive documentation on this topic is available online. A good place to start is the Adrzej Leszkiewicz's GitHub repository with dozens of free-to-use templates (MIT license).
Reuse of Configuration
Once you've created a nice visualization yourself, you'll probably want to use it more often. To make this easier, Deneb has added an export button in the configuration screen. Click the button and save your definition as a JSON template so you can reuse it in a future report.
In conclusion
Even Vega-Lite has a fairly steep learning curve. So be prepared to analyze what others have created, read the online documentation, and experiment a lot. However, once you’ve mastered it, the sky’s the limit.