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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
govind_021
Super User
Super User

Conditional Formatting

Hello Everyone , 
I am having one issue , can anyone please help

Scenerio is that
I have Matrix visual and on rows I have two columns employee and project , and in columns i have year and month employee upper in hierarchy and projects will show when we will drill down . I have one KPI that i am using in values so kpi is percent , so at employee level conditional formatting have been applied on the basis of magnitude of the percent value , so i have three color red , green , yellow  and when i drill down to project level I want formatting different , the percent should show as it is but not basis of the magnitude , but on the basis of category column ( ordered = grey , planned = blue , blank = white ) . 
so how can i solve this.
ask if you require any other info.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @govind_021 

 

Thank you very much Ritaf1983 for your prompt reply.

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Table"

vnuocmsft_0-1735004502220.png

 

Create a measure. Different colors are displayed by judging the current hierarchical structure of the matrix.

 

ProjectColor = 
IF(
    ISINSCOPE('Table'[Project]),
    SWITCH(
        TRUE(),
        ISBLANK(SELECTEDVALUE('Table'[Category])), "White",
        SELECTEDVALUE('Table'[Category]) = "Ordered", "Grey",
        SELECTEDVALUE('Table'[Category]) = "Planned", "Blue"
    ),
    IF(
        ISINSCOPE('Table'[Employee]),
        SWITCH(
            TRUE(),
            SELECTEDVALUE('Table'[KPI]) < 0.60, "Red",
            SELECTEDVALUE('Table'[KPI]) = 0.60, "Yellow",
            SELECTEDVALUE('Table'[KPI]) > 0.60, "Green"
        )
    )
)

 

vnuocmsft_4-1735004892190.png

 

vnuocmsft_5-1735004945696.png

 

Here is the result.

 

Employee level

vnuocmsft_2-1735004658311.png

 

Project level

vnuocmsft_3-1735004690357.png

 

Regards,

Nono Chen

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @govind_021 

 

Thank you very much Ritaf1983 for your prompt reply.

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Table"

vnuocmsft_0-1735004502220.png

 

Create a measure. Different colors are displayed by judging the current hierarchical structure of the matrix.

 

ProjectColor = 
IF(
    ISINSCOPE('Table'[Project]),
    SWITCH(
        TRUE(),
        ISBLANK(SELECTEDVALUE('Table'[Category])), "White",
        SELECTEDVALUE('Table'[Category]) = "Ordered", "Grey",
        SELECTEDVALUE('Table'[Category]) = "Planned", "Blue"
    ),
    IF(
        ISINSCOPE('Table'[Employee]),
        SWITCH(
            TRUE(),
            SELECTEDVALUE('Table'[KPI]) < 0.60, "Red",
            SELECTEDVALUE('Table'[KPI]) = 0.60, "Yellow",
            SELECTEDVALUE('Table'[KPI]) > 0.60, "Green"
        )
    )
)

 

vnuocmsft_4-1735004892190.png

 

vnuocmsft_5-1735004945696.png

 

Here is the result.

 

Employee level

vnuocmsft_2-1735004658311.png

 

Project level

vnuocmsft_3-1735004690357.png

 

Regards,

Nono Chen

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

Ritaf1983
Super User
Super User

Hi @govind_021 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors