Data Analytics
  • All of Microsoft
  • Python
  • My Role
    • All in My Role
    • Data Analytics
  • Focus
    • All in Focus
    • Microsoft Ignite 2026
    • Microsoft Fabric
    • What's Hot
    • M365 Release
  • Security & Identity
Timespan
explore our new search
Power BI: build and package a custom visual
Power BI

Power BI: build and package a custom visual

by HubSite 365 about Injae Park

Technical Lead - Business Intelligence • Microsoft Certified PL-300 • Data Analyst • Power BI Youtube

Power BI developers can build a custom visual with TypeScript and package it as a PBIVIZ file for import into reports.

Key insights

  • A PBIVIZ file packages a visual's code, metadata, and resources.
  • The development workflow uses Visual Studio Code, TypeScript, Node.js, npm, and the Power BI visuals tools.
  • Use `pbiviz new MyCustomVisual` to create a project and `pbiviz package` to produce the PBIVIZ file.
  • Capabilities define the fields and formatting options that report authors can use.
  • Custom visuals are executable code; import them only from trusted developers and sources.

Power BI developers can create custom visuals for charts and interactions that standard visuals do not cover, then package them as PBIVIZ files for import into reports. This approach is for developers building specialized visuals for personal, organizational, or embedded reporting. Injae Park’s YouTube Short raises the task of creating a PBIVIZ; the development workflow below explains the project and packaging steps.

What it does

A PBIVIZ file is a packaged Power BI visual containing rendering code, metadata, and resources. Its metadata identifies the visual, including its name, unique ID, version, and author details. Once imported, the visual can be used in a report like other visuals.

The visual receives data through Power BI’s data view and renders it in its own interface. Its capabilities describe data mappings and options, while its TypeScript logic handles rendering and updates. Developers can create visuals for specialized charts, indicators, maps, diagrams, or other reporting needs.

Who it is for and what you need

This workflow suits developers who need a visual beyond Power BI’s standard charts, as well as teams creating a reusable visual for organizational reports. The development environment described uses Visual Studio Code, Node.js and npm, TypeScript, and the Power BI visuals tools. D3.js is an optional library.

Power BI Desktop or the Power BI service can be used to test the visual. The tools generate a project structure, and its capabilities and metadata must be configured as development proceeds. An administrator’s tenant policies may affect whether custom visuals can be imported or used in an organization.

How it works

  1. Install the development tools, including Node.js, npm, Visual Studio Code, and the Power BI visuals tools.
  2. Create a project with , open the generated folder, and install its dependencies with .
  3. Define data roles and mappings in the visual’s capabilities so Power BI can provide the appropriate fields to report authors.
  4. Implement the visual in TypeScript. Handle incoming data, rendering, updates, resizing, filtering, and formatting changes.
  5. Run and test the visual locally, including its data mapping, interactions, and formatting, before packaging it.
  6. Run to produce the PBIVIZ file, then import that file into Power BI.

Limitations and alternatives

Custom visuals are executable code and can create security or privacy risks. Use visuals only from developers and sources you trust, and check organizational policies before importing one into a report.

Before distributing a visual, review its metadata, including its name, GUID, version, description, support URL, and author details. The version uses a four-part format. When updating an existing visual, retain its GUID and increase its version number.

Sources

Frequently asked questions

What is a PBIVIZ file in Power BI?

It is a packaged Power BI visual containing the code, metadata, and resources needed to render the visual. Import the file into Power BI to use the visual in a report.

What tools do I need to create a Power BI custom visual?

The described setup uses Visual Studio Code, Node.js, npm, TypeScript, and the Power BI visuals tools. D3.js is optional.

How do I package a Power BI custom visual?

Run `pbiviz package` in the project to create a PBIVIZ file, then import that file into Power BI.

What should I check before importing a custom visual?

Custom visuals are executable code, so use only trusted developers and sources. Organizational tenant policies may also affect whether custom visuals can be imported or used.