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
Anonymous
Not applicable

Conditional formatting for one hierarchy level

I have a matrix where I want conditional formatting to apply only to one level of the hierarchy, the "name" level.

 

The rows "Anthony Heaven" and "Cassie Mesko" should have a background color, but nothing above or below this hierarchy level. This level of the hierarchy is called "Resource".

Screenshot 2023-02-23 143440.png

 

The conditional formatting should run on a different measure called "Utilization Rate". If Utilization Rate is greater than 0.90 (90%), the cell should become red. If it is 70%-90%, yellow. If it is 70% or less, green.

 

Looking through other posts, it looks like the best course of action is to create a measure and then use that as the basis for conditional formatting, but I cannot get it to work.

 

I created this measure:

Utilization Color =
VAR Utilization = 'Deployment'[Utilization Rate]
RETURN
IF(NOT(ISINSCOPE('Deployment'[Resource])),(if(Utilization>.90,"Red","Green")))
 
3 REPLIES 3
srikanthgunnam7
Frequent Visitor

Hello, Have you found a solution to this?

Anonymous
Not applicable

Yes, I did. If it's helpful to you:

 

Conditional formatting: Background Color

Format style: Field value

Apply to: Values and Totals

What field should we base this on: conditionalformatting

 

Formula for that field:

conditonalformatting =
    VAR varLevel2 = ( 90 / 100 )
    VAR varLevel1 = ( 35 / 1000 )
    RETURN
     SWITCH (
                         TRUE(),
           ISINSCOPE ('Projector Deployment Report Current and Planned'[Stage]), BLANK (),
           ISINSCOPE ('Resource Assigned Practice Group'[Name])   &&
                               ([Utilization Rate]) >= varLevel2, "#efb5b9",
           ISINSCOPE ('Resource Assigned Practice Group'[Name])   &&
                              ( ([Utilization Rate]) >= 0.7 && ([Utilization Rate]) < 0.9), "#f0e199",
  ISINSCOPE ('Resource Assigned Practice Group'[Name])   &&
                              ([Utilization Rate]) < 0.7, "#d0ef9e",
 "#ffffff"
)
Anonymous
Not applicable

Hi  @Anonymous ,

I created some data:

vyangliumsft_0-1677483978807.png

Here are the steps you can follow:

1. Create measure.

 

Color =
SWITCH(
TRUE(),
    ISINSCOPE('Table'[Group3]) && [Utilization Rate] >0.9 ,"red",
    AND(ISINSCOPE('Table'[Group3]) ,[Utilization Rate] >0.7) && AND(ISINSCOPE('Table'[Group3]) ,[Utilization Rate] <=0.9),"yellow",
    ISINSCOPE('Table'[Group3]) && [Utilization Rate] <=0.7 ,"green")

 

2. Conditional formatting – Background color.

vyangliumsft_0-1677484088059.png

3. Enter Background color.

Format style – Field value

What field should we base this on – [Color]

vyangliumsft_2-1677483978810.png

4. Result:

vyangliumsft_1-1677484104086.png

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.