In this blog you will understand all about “Conditional formatting for data labels” feature in Power BI.
Microsoft Power BI team released “Conditional formatting for data labels” feature in Aug-2022 updates.
Using this feature you can apply the conditional formatting for data labels of visuals.
Where you can find the conditional formatting options?
Select the visual > Go to the formatting pane> under Data labels > Values > Color

Data Labels
Let’s Get Started-
Add one line chart visual into page and create two measure for Profit & Sales.
Note: If you don’t want to create measure then you can directly use Sales and Profit fields.
Total Profit = SUM(financials[Profit])
Total Sales = SUM(financials[ Sales])

Line chart visual exp
Apply Conditional formatting for Data Labels-
Example-1: Conditional formatting based on Rules
Step-1: Select the visual >go to the format pane>Data Labels.
Step-2: Choose measure from “Apply settings to”.

choose measure
Step-3: Go to Values> Click on fx icon.
Step-4: Choose Format Style – Rules and Select measure name. After that add rules condition, see the below given screen shot.

Choose Rules conditional formatting
Step-5: Same steps you can apply for other measures. You can see the given below final screen shot, data labels color has been changed as per set conditions.

Data Labels result
Example-2: Conditional Formatting based on Gradient
Step-1: Select the visual >go to the format pane>Data Labels.
Step-2: Apply settings to – All
Step-3: Go to Values> Click on fx icon.
Choose Format style Gradient and here you can define three colors for Lowest, Middle & Highest values. And click on OK.

Gradient conditional Formatting
Also, you can choose custom option to enter custom value. Exp- Click on Lowest Value dropdown and choose custom > then enter a value.
Step-4: See the result of Gradient conditional formatting-

Gradient Conditional Formatting
Hope you understand how to set conditional formatting for data labels.