Power BI

Create Power BI Custom Visuals

To personalize the user experience is important in many fields, but have you ever thought about customizing Power BI visuals? And why is it important in many cases?

When you share a report with a broad audience, some of your users might want to see slightly different views of particular visuals. Maybe they’d want to swap what’s on the axis, change the visual type, or add something to the tooltip. It’s difficult to make one visual that satisfies everyone’s requirements. With this new capability, you can empower your business users to explore and personalize visuals, all in report reading view. They can adjust the visual the way they want and save it as a bookmark to come back to. They don’t need to have edit permission for the report or go back to the report author for a change.

What report can users change?

This feature is ideal for report creators: You can enable basic exploration scenarios for your report readers. Your report readers gain further insights through ad hoc exploration of visuals on a Power BI report. Here are the modifications that they can make:

  • Change the visualization type.
  • Swap out a measure or dimension.
  • Add or remove a legend.
  • Compare two or more measures.
  • Change aggregations, etc.

Not only does this feature allow for new exploration capabilities, it also includes ways for users to capture and share their changes:

  • Capture their changes.
  • Share their changes.
  • Reset all their changes for a report.
  • Selecting Reset to default removes all personalizations.
  • Reset all their changes for a visual. Clear out their recent changes.

After all, what is important to know how we could import such a custom visual?

Many certified Power BI visuals are available from AppSource. These visuals are created by Microsoft and Microsoft partners and are validated by the AppSource validation team. You can download these visuals directly to your Visualizations pane.

However, as a developer, you can import custom visuals from your own computer into Power BI, as Power BI visuals are packaged as .pbiviz files that can be stored on your computer. You can share these files with other Power BI users. You can download visual files from AppSource onto your computer, but you can also get custom visuals from a trusted friend or colleague. Custom visuals that come from sources other than official Microsoft sources should be imported only if you trust the source.

Thus, all you need to start developing your own custom visuals is to set up your environment for developing a Power BI visual. And here is how:

1. Install node.js: Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. It allows developers to run any apps created on JavaScript.

2. Install pbiviz: pbiviz tool, which is written using JavaScript, compiles the visual source code of the pbiviz package. The pbiviz package is a zipped Power BI visual project, with all the needed scripts and assets.

3. Set up Power BI desktop for developing a visual:

a. To develop a Power BI visual, enable the Develop a visual option in the Power BI desktop. Follow the instructions in this section to enable this option. From the Power BI desktop, navigate to File > Options and settings > Options

b. Scroll down to Report settings and enable the Developer Mode check box.

c. Select Ok.

4. Set up Power BI service for developing a visual:

To develop a Power BI visual, enable custom visual debugging in Power BI service. Follow the instructions in this section to enable this option.

a. Sign in to PowerBI.com.

b. Navigate to Settings > Settings > Settings

c. From the General tab, select Developer. In the Developer setting, select the Enable developer mode check box, and then select Apply.