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

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

Reply
IntaBruce
Resolver I
Resolver I

Conditional formatting confusion

Hi,

I've used conditional formatting before and got it working fine, but today I am having problems.  In the table below I want the text in the Status column to be green or red for Pass or Fail.

IntaBruce_1-1722608600312.png

 

I created the following measure:

Status Colour = SWITCH(SELECTEDVALUE(Quality[Status])
                        ,"Pass","Green"
                        ,"Fail","Red"
)
And then I used that measure to conditionally format the Status field based on the Status Colour measure.  As you can see below it worked.

IntaBruce_0-1722608570512.png

BUT, when I don't include the Status Colour measure as a column in the table the Status column reverts to black

IntaBruce_2-1722608904458.png

What am I doing wrong?  I obviously don't want to include the colour name in the visual.
Thanks for you help.

6 REPLIES 6
Anonymous
Not applicable

Hi All,

Firstly,  @shafiz_p and @AnkitaaMishra  thank you for yours solution!

And @IntaBruce can you provide the relevant instance data, or your pbix file, as my instance data is too simple and perhaps does not replicate your question.

vxingshenmsft_0-1722834302281.png

Hope it helps!

 

Best regards,
Community Support Team_ Tom Shen

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

AnkitaaMishra
Super User
Super User

Hi @IntaBruce , 
I am using the same DAX as you have used and applying the conditional formatting from using the format visual pane ---> under cell elements section ---> click on 'fx' function for font color as shown below : 

AnkitaaMishra_0-1722609891112.png

Please let me know if this works for you or provide additional details for your requirement.

Thanks,

Ankita



Thanks @AnkitaaMishra  I looked there and the same config appears there already, it seems to be two ways to reach the single setting so changing this doesn't work.

IntaBruce_1-1722617532294.png

 

shafiz_p
Super User
Super User

Hi @IntaBruce  To fix this problem, go to cell elements in the format pane, click font color. See the image below:

shafiz_p_0-1722609651528.png

 

Then set the format style "Field Value" and Select your measure in the "What Field Should". See the image below:

 

shafiz_p_2-1722610062769.png

 

 

Hope this helps!!

If this solved your problem, please mark it as a solution!!

Thanks @shafiz_p I looked there and the same config appears there already, it seems to be two ways to reach the single setting so changing this doesn't work.

IntaBruce_0-1722617510486.png

 

@IntaBruce  Not very much clear. If the provided solution by @AnkitaaMishra  or me not worked, there is other way to check if this working or not. Make it hardcoded. Check the given image for another solution. Select series "Status" and Click on fx button under the font color.

 

shafiz_p_0-1722619081597.png

 

 

You will get screen like below. Set value same as the given image.

shafiz_p_1-1722619159016.png

Hope this helps!!

If this solved your problem, please mark it as a solution!!

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.