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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
hasharma19
Helper II
Helper II

Conditional Formatting

Hi All,

 

I have prepared a dashboard wherein a small issue noticed during conditinal formatting

 

The YTD(92.20%) number supposed to be in green as its avboe the target(92.08%) and the gap also be in green.

hasharma19_0-1737451673107.png

 

Surprisingly, the same conditinal formatting i have applied on the table. it is showing correct color coading as green

hasharma19_1-1737451769698.png

 

Can someone pls help me to understand the issue.

4 REPLIES 4
Anonymous
Not applicable

Hi @hasharma19 ,

Firstly if you are using Card visual I think you can just choose to change the font color manually.

vyilongmsft_0-1737512361504.png

 

Secondly if you are coloring in a table or matrix, you can create a Measure to adjust the desired background color.

Measure = IF(MAX('Table'[IN])<0.92,"Red","Green")

vyilongmsft_1-1737512605558.png

vyilongmsft_2-1737512639334.png

So you can get what you want.

vyilongmsft_3-1737512747087.png

 

 

Best Regards

Yilong Zhou

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

  @rit_ty7 @Anonymous @danextian @Below are the measures i have applied on the cards

YTD Perf% measure

hasharma19_0-1737518660529.png

Current Month Perf%

hasharma19_1-1737518683688.png

Gap from target%

hasharma19_2-1737518696078.png

 

below are the measure applied on the table

background

hasharma19_4-1737518731063.png

 

Fornt

hasharma19_5-1737518779625.png

Not able to find any option to upload the PBI File

rit_ty7
Advocate I
Advocate I

Hi @hasharma19 , 

 

To apply the same color logic you used in the conditional formatting of the cell element to the card's background or font, you can use the same example_Color_measure in a similar way. Here's how:

Example Color Measure:

Test_color = 
IF(
    SUM(FACT_SALES_S3_ALL_FILTER[BILLED_QUANTITY]) < 17000000, 
    "#36dfcf", 
    "#ffffff"
)

Steps to Apply This to a Card:

  1. Go to the Format Pane of the card visual.
  2. Under Effects, find the Background or Font Color option.
  3. Click the fx button next to the respective property.
  4. In the Conditional Formatting window:
    • Set the Format Style to "Field Value."
    • In the Based on Field dropdown, select the measure Test_color.
  5. Apply and close the window.

Now, your card's background or font color will dynamically change based on the logic defined in Test_color.

This approach ensures consistency between the conditional formatting in your matrix or table visuals and the card visual.


Select field value and select the color measureSelect field value and select the color measurefor text's conditional formatting, go to callout value's color and use the given measurefor text's conditional formatting, go to callout value's color and use the given measure
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Ritesh Kumar,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

danextian
Super User
Super User

Hi @hasharma19 

Is the highglighted a dimension or measures?

danextian_0-1737457010050.png

What is your conditional formatting logic/condition/measure? What is target if added together with YTD Profit in the same visual?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.