Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Janica123
Helper I
Helper I

Conditional Format Data Lables Field Value

Hi,
I'm trying to conditionally format the data lable of a column chart, based weather the value is positive (green) or negative (red)

However, when trying to format based on 'Field Value', the dropdown box for 'What field should we base this on?' is outlined red, and it doesn't let me select my measure.

This is how my measures looks like:

 

%Change_Tagessatz =
VAR Change =
DIVIDE(
[Ø Tagessatz] - [Ø Tagessatz_LY],
[Ø Tagessatz_LY]
)

RETURN
FORMAT(Change, "0.0%")

 

%Change_Tagessatz_Color = IF( [%Change_Tagessatz] > 0, "Green", "Red")

 

In the dropdown box I want to put the 2. measure (%Change_Tagessatz_Color)

Any ideas?

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Janica123 -You need to create a measure that returns a numeric or color code value. The best approach is to use color codes (Hex or RGB) instead of text

 

link:

Color Hex Color Codes (color-hex.com)

 

%Change_Tagessatz_Color =
IF(
    [%Change_Tagessatz] > 0,
    "#00FF00",   // Green in Hex
    "#FF0000"    // Red in Hex
)

 

 

rajendraongole1_0-1724438246842.png

 

This measure returns the Hex color code for green when the value is positive and red when the value is negative.In the "Based on field" dropdown, select your measure.

 

Hope it helps.

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
gmsamborn
Super User
Super User

Hi @Janica123 

 

I noticed a problem with your measures.

When you format the result using FORMAT, it returns a text value which you won't be able to compare to zero in your second measure.

Format the measure using the formatting ribbon if required.



Proud to be a Super User!

daxformatter.com makes life EASIER!
rajendraongole1
Super User
Super User

Hi @Janica123 -You need to create a measure that returns a numeric or color code value. The best approach is to use color codes (Hex or RGB) instead of text

 

link:

Color Hex Color Codes (color-hex.com)

 

%Change_Tagessatz_Color =
IF(
    [%Change_Tagessatz] > 0,
    "#00FF00",   // Green in Hex
    "#FF0000"    // Red in Hex
)

 

 

rajendraongole1_0-1724438246842.png

 

This measure returns the Hex color code for green when the value is positive and red when the value is negative.In the "Based on field" dropdown, select your measure.

 

Hope it helps.

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors