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
helen_p
Frequent Visitor

Conditional format rows in a matrix table based on a measure

Dear Power BI community

 

What I would like to achieve is

 

I want to create a matrix table where the headings of rows (which will be in a hierachy) are conditionally formatted based on the outcome of  a measure.    If the lowest row in the hierachy does not meet the condition of the measure, when the matrix table is NOT expanded, then the highest level in the table shows the same colour too

 

What is the data like

There are 3 columns which are in a hierachy Hospital >> Care Group >> Ward

 

I.e. 

 

Hospital   Care Goup   Ward

SGH              A                 1    

SGH              A                 2

SGH              B                 3

 

Measures

 

I have 2 measures called "Actual discharges" and "Expected Discharges" and when put together with the columns, it looks like this

 

 

Hospital   Care Goup   Ward    Actual discharges       Expected discharges

SGH              A                 1                3                                        2

SGH              A                 2                4                                        5

SGH              A                 3                3                                        2

SGH              B                 4                7                                        6

 

What to base the conditional format on

 

I wwas thinking of creating another measure where 

if([Actual Discharges] <= [Expected Discharges], "Red", "Green")
 
Expected outcome
 
In a NON expanded matrix table  Care group A would be red because Ward 2 still has an issue and is not meeting the expected number of discharges
 
Is this at all possible?
 
 

 

 

 

 

 

 

 

 

1 REPLY 1
lbendlin
Super User
Super User

Not currently possible.  If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.powerbi.com

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.