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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Conditional Formatting across row

Goal:

I need to highlight entries in the matrix that should be highlighted as specified in the source file.

 

jdalfonso_0-1669722851916.png

 

Source File:

 

jdalfonso_1-1669722875938.png

As you can see, the RAG column is what I am using to colour the entry in the matrix. 

 

Formula used:

RAG Background Color Format =
IF (
    MAX ( 'Scorecard Detail'[RAG] ) = "RED",
    "#F5D9DB",
    IF (
        MAX ( 'Scorecard Detail'[RAG] ) = "GREEN",
        "#E4F1D1",
        IF ( MAX ( 'Scorecard Detail'[RAG] ) = "AMBER", "#FFF0BE", "#F2F2F2" )
    )
)

 

Problem:

 

The formula I used does not take into account the first column in the source file.  It only takes the max RAG which is RED  based on the report layout: 

jdalfonso_2-1669723061008.png

 

I want it to be able to take into account the date (first column) in the source file but how do I make it dynamic with respect to the row information as well? Red should only be applicable to entries with RED status and Q1 Actuals column since it is July (date column in source file). 

 

July to Sep - Q1

Oct to Dec - Q2

and so on.. 

 

2 REPLIES 2
v-yinliw-msft
Community Support
Community Support

Hi @Anonymous ,

 

So you mean in the last image this column should only show red in Q1 Actual this column?

That is, the quarter that July contains is only shown red, and the other four columns should not actually show red?

And could you please tell me how you use the formula to format the visual, that is in which column or measure?

 

You can also refer this link:

Solved: Applying specific conditional formatting across in... - Microsoft Power BI Community

 

Best Regards,

Community Support Team _Yinliw

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

Anonymous
Not applicable

That is, the quarter that July contains is only shown red, and the other four columns should not actually show red?

 

-> Yes as it takes into account the date in the first column. The color should reflect what quarter it is indicated from the first column. So the dax for the color background should look at the column status and the row status. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.