Building a Custom Power BI Visual from scratch (KPI Card)
In this article we will build a custom Power BI visual from scratch, we will build a KPI card with selections (interactivity in the dashboard), drill-through functionality, formatting options and highlighting.
The code changes are kept to a minimum, so we hardly use typing or describe interfaces. This allows us to focus on the core mechanisms that we need to introduce in the code.
Each steps links to a GitHub commit so you can easily reproduce what happened.
Enjoy!
Create the Solution
First, we create a new visual using PowerShell and open Visual Studio:
pbiviz new KPICard_Tutorial
cd kPICardTutorial
start devenv .
See commit for the newly created files.
Create the Power BI File
We create the Power BI File with some Sample Data.
We publish the Power BI file to the cloud and start the server (using PowerShell).
pbiviz start
We add the custom visual (‘</>’) and press the reload button (triangle).