How to Add Data Labels in Power BI? [With Examples]

A Power BI visual becomes difficult to read without data labels. At the same time, adding data labels in Power BI visualization is a good practice. Many analysts often include data labels in their visuals.

You might wonder what a data label is in Power BI. Don’t worry.

In this Power BI tutorial, we will explain data labels in Power BI and how to add data labels in Power BI. Also, we will see how to format the data labels in Power BI.

Additionally, we will discuss what is power BI Custom Data Labels and how to add them to a chart.

Power BI Data Labels

In Power BI, a data label is a value displayed on a chart or visualization that provides information about the data point.

This helps users quickly understand the specific data associated with each point without the need to refer to the hover over the Point.

Imagine you have a simple line chart in Power BI that shows the monthly sales revenue for your business. Each point on the line represents the sales revenue for a specific month.

After adding the data label, the line chart looks like the screenshot below.

data labels in power bi

How to Add Data Labels in Power BI

This example shows how to add data labels in Power BI.

Scenario:

You manage a retail store that sells various products, and every month, you analyze the sales data for different product categories to understand which categories are performing well and which ones may need improvement.

You want to add data labels to the chart to display the exact sales revenue value for each product category directly on the Power BI chart.

In this scenario, we have an Excel file named SalesData with columns Product Category, Sales Revenue (USD), and Date. Check the screenshot below.

how to add label in power bi

Now follow the below steps to add Power BI data labels:

1. Open Power BI Desktop and load data using the Get data option. Then, you can see data in the Data pane.

data labels power bi

2. Under the Home tab, expand Visual gallery(black box) -> Click the Stacked column chart.

show data labels in power bi

3. Then, using the +Add data option, add Month into the X-axis, Sales Revenue (USD) into the Y-axis, and Product Category into the Legend field.

power bi labels

4. Now you can see the Stacked column chart created successfully.

power bi label

5. Now Select the Stacked column chart -> Click the Format pane -> select the Visual -> enable the Data labels.

how to add data labels in power bi

6. After that, you can see in the Stacked column chart that you enable Data labels.

data label in power bi

This way, you can add data labels in Power BI to display the exact sales revenue value for each product category directly on the chart.

Format Power BI Data Labels

This example will explore the format options available for Power BI data labels.

I hope you all enable data labels on your Power BI Visual.

When you expand Data labels in the Format pane, you will find dropdown options: Options, Title, Value, Detail, Background, and Layout. Check the screenshot below.

power bi format data labels

Let’s look at each option in the dropdown one at a time.

Format Power BI Data Labels using Options:

With this formatting, we can adjust the orientation of the data labels to either vertical or horizontal. Additionally, we can change the position of the data labels to inside end, inside center, or inside base.

Format Power BI Data Labels using Options

Format Power BI Data Labels using Title:

With this formatting, we can include the title for the data labels. Furthermore, we can modify the title’s font, color, size, and transparency.

Format Power BI Data Labels using Title

Format Power BI Data Labels using Value:

Using this formatting, we can customize the data label values’ font, color, size, and transparency. Additionally, we can adjust the display units to show values as None, Thousands, Millions, Billions, or Trillions, and we can control the number of decimal places.

Furthermore, if necessary, we can apply conditional formatting to the data label values using the fx button.

Format Power BI Data Labels using Value

Format Power BI Data Labels using Detail:

Using this formatting, we can add external details to the data labels. Also, we can change the details font, size, color, and transparency.

Format Power BI Data Labels using Detail

Format Power BI Data Labels using Background:

The data labels the background is used to add background color and we can change the transparency of the color.

Format Power BI Data Labels using Background

This way, you format data labels on the Power BI desktop.

Custom Data Labels in Power BI

In Power BI, custom data labels allow you to add specific information or values directly onto your visualizations.

Add custom data labels in Power BI Visual. I used the above Stacked column chart. I hope you created the above charts.

Now, we create a measure to find the Sales Percentage. After that, we add this measure to the stacked column chart data labels. To do this, follow the below steps:

1. Under the Home tab, click “New measure.”

how to add custom data labels in power bi

2. In the formula bar put the below expression. Then click the Commit button.

Sales Percentage = 
DIVIDE(
    SUM('SalesData'[Sales Revenue (USD)]), 
    CALCULATE(
        SUM('SalesData'[Sales Revenue (USD)]),
        ALL('SalesData'[Product Category])
    )
)

Where:

  • Sales Percentage = Name of the measure that stores sales percentage.
  • DIVIDE() = Divide function used to calculate inside the parentheses by the second calculation result.
  • SUM(‘SalesData'[Sales Revenue (USD)]) = Add up all the sales revenue values in the SalesData table.
  • CALCULATE = Perform a calculation while temporarily modifying the filter context.
  • SUM(‘SalesData'[Sales Revenue (USD)]) = Add up all the sales revenue values in the SalesData table, considering the modified filter context.
  • All() = Remove any filters applied to the Product Category column.
power bi add custom data labels

3. Under the Home tab, click “New measure.”

how to add custom data labels in power bi

4. In the formula bar put the below expression. Then click the Commit button.

Labels = FORMAT( [Sales Percentage],"0.0%")

Where:

  • Labels = Name of the measure.
  • FORMAT() = This function formats a value based on the specified format string.
  • [Sales Percentage] = It refers to the measure containing the sales percentage.
  • “0.0%” = This is the format string specifying the value should be shown as a percentage with one decimal place.
how do i customize data labels in power bi

5. Then, Select the chart -> expand the Format pane -> click Visual -> expand Data labels.

how to add data labels in power bi chart

6. After that, expand the Detail dropdown -> click the +Add data -> select Labels.

Custom Data Labels in Power Bi

7. Then you can see the Sales Percentage added to the Power BI Stacked column chart.

Power BI Custom Data Labels

This way, you add custom labels on bar and column charts in Power BI.

Conclusion

I hope you will find this tutorial helpful on data labels in Power BI.

This tutorial covered data labels in Power BI and how to add them to your visualizations. We also explored how to format these labels for better presentation.

Furthermore, we discussed Power BI Custom Data Labels and learned how to add them to a chart for more advanced information.

Some more Power BI articles you may also like:

  • >