Forum Discussion

mianjalil239's avatar
mianjalil239
Helper III
1 year ago
Solved

Subject: Conditional Formatting on a Combo Chart – How to Apply Conditional Formatting to Only One

Subject: Conditional Formatting on a Clustered Column Chart – How to Apply Conditional Formatting to Only One Column (Actual vs. Target)

Question:

Hello Power BI Community,

I’m trying to apply conditional formatting to the Actual column in a Clustered Column Chart, but I’m facing an issue. Here's what I've done:

  1. I created a Budget MTD measure like this:

java

Copy code

Budget MTD =

SWITCH(

    SELECTEDVALUE('KPI'[KPI]),

    "Actual", [MTD Budget Actual],

    "Target", [MTD Budget Target]

)

  1. I created another measure for conditional formatting:

css

Copy code

Actual Color Measure =

IF([MTD Budget Actual] > [MTD Budget Target], 1, 0)

  1. Then, I applied conditional formatting to the Budget MTD measure using the Actual Color Measure. The idea is to color the Actual column Red if it exceeds the Target, and Green otherwise.

However, despite following these steps, the conditional formatting is applying to both Actual and Target columns. I want the conditional formatting to be applied only to the Actual column, not the Target column.

Has anyone encountered this issue or can provide a solution to apply the conditional formatting only to the Actual column in a Clustered Column Chart?

I’d really appreciate any help.

Thank you!

  • Hi mianjalil239 

     

    Your actual color measure does not indicate that the color is to be applied only when the current kpi value is Actual so it is applied to both. Please see screenshot below.

     

3 Replies