Adding a KPI (Key Performance Indicator) in Power BI involves several steps:
- Open Power BI Desktop and load your data into the model.
- Click on the “Home” tab and then click on the “New Measure” button in the “Calculations” group.
- In the formula bar, you can enter a formula to calculate your custom KPI. For example, if you want to calculate the total sales for a specific period, you can use the following formula:
- Press Enter to create the measure. It will now appear in the “Fields” pane under the corresponding table.
- To create a KPI visual, drag and drop the measure you created onto the report canvas.
- Click on the “Format” tab to customize the appearance of the KPI visual. You can change the font, colors, and other formatting options to match your preferences.
- You can also define thresholds for your KPI by clicking on the “Data bars” button in the “Visualizations” pane. This allows you to set different colors based on values falling within certain ranges.
- To add additional KPIs, repeat the above steps for each measure you want to include in your dashboard.
TOTAL_SALES = SUM('Sales'[Amount])
Here’s an example: