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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
KR300
Helper III
Helper III

Dynamic Fill Color based on Multiple AND Conditions

Hi I have a table like below.

 

I have a shape visual for each stage. I want to fill up color dynamically in the shape visual based on certain conditions. Moreover, i have only one slicer in the report which is "FixVersion Name".

Conditions:

Stage="Stage Name" && [Is Final Round]="True" && [Stage Status]="Success" then "Green",

Stage="Stage Name" && [Is Final Round]="True" && [Stage Status]="UnSuccess" then "Red",

Stage="Stage Name" && [Is Final Round]="True" && [Stage Status]="In Progress" then "Yellow"

 

like this

Do i need to change the structure of the table? if it need to work properly ( Pls suggest a table structure but need to hall all info )

or Any workaround that would be greatful.

 

FixVersion IDFixVersion NameStageRoundIs Final RoundPlanned DateActual DateStage StatusTracking of Stage
8SFP.R.11.8Release InitiationRound 1TRUE12/13/202412/14/2024CompletedOn Track
8SFP.R.11.8QA2 DeployRound 1FALSE12/13/202412/13/2024CompletedOn track
8SFP.R.11.8QA2 DeployRound 2FALSE12/14/202412/15/2024FailedOff track
8SFP.R.11.8QA2 DeployRound 3FALSE12/15/202412/15/2024CompletedOn Track
8SFP.R.11.8QA2 DeployRound 4TRUE12/16/202412/16/2024SuccessOn Track
8SFP.R.11.8QA2 Testing & Sign-OffRound 1TRUE12/15/202412/16/2024SuccessOn Track
8SFP.R.11.8Stage DeployRound 1FALSE12/18/202412/18/2024UnsuccessOn Track
8SFP.R.11.8Stage Testing & Sign-OffRound 1FALSE12/19/202412/19/2024In ProgressOn Track
8SFP.R.11.8Perf DeployRound 1FALSE12/18/202412/19/2024Not StartedOn Track
8SFP.R.11.8Perf Testing & Sign-OffRound 1FALSE12/22/202412/25/2024BlockedOn Track
8SFP.R.11.8Security ScansRound 1FALSE12/23/202412/26/2024CancelledOn Track
8SFP.R.11.8Go/No-Go DecisionRound 1FALSE12/24/202412/27/2024CancelledOn Track
8SFP.R.11.8Prod DeployRound 1FALSE12/25/202412/25/2024CancelledOn Track
8SFP.R.11.8Prod Health CheckRound 1FALSE12/25/202412/25/2024CancelledOn Track
9SFP.R.11.9Release InitiationRound 1TRUE12/13/202412/14/2024CancelledOn Track
9SFP.R.11.9QA2 DeployRound 1FALSE12/13/202412/13/2024CompletedOn track
9SFP.R.11.9QA2 DeployRound 2FALSE12/14/202412/14/2024CompletedOn track
9SFP.R.11.9QA2 DeployRound 3FALSE12/15/202412/15/2024FailedOn Track
9SFP.R.11.9QA2 DeployRound 4TRUE12/16/202412/16/2024CompletedOn Track
9SFP.R.11.9QA2 TestingRound 1TRUE12/13/202412/14/2024SuccessOn Track
9SFP.R.11.9QA2 TestingRound 2TRUE12/14/202412/14/2024SuccessOn Track
9SFP.R.11.9QA2 TestingRound 3TRUE12/15/202412/15/2024UnsuccessOn Track
9SFP.R.11.9QA2 Testing & Sign-OffRound 4TRUE12/15/202412/16/2024Not StartedOn Track
9SFP.R.11.9Stage DeployRound 1FALSE12/18/202412/18/2024Not StartedOn Track
9SFP.R.11.9Stage TestingRound 1FALSE12/18/202412/18/2024BlockedOn Track
9SFP.R.11.9Stage Testing & Sign-OffRound 1FALSE12/19/202412/19/2024In ProgressOn Track
9SFP.R.11.9Perf DeployRound 1FALSE12/18/202412/19/2024CancelledOn Track
9SFP.R.11.9Perf TestingRound 1FALSE12/19/202412/20/2024CancelledOn Track
9SFP.R.11.9Perf Testing & Sign-OffRound 1FALSE12/22/202412/25/2024CancelledOn Track
9SFP.R.11.9Security ScansRound 1FALSE12/23/202412/26/2024CancelledOn Track
9SFP.R.11.9Go/No-Go DecisionRound 1FALSE12/24/202412/27/2024CancelledOn Track
9SFP.R.11.9Prod DeployRound 1FALSE12/25/202412/25/2024CancelledOn Track
9SFP.R.11.9Prod Health CheckRound 1FALSE12/25/202412/25/2024CancelledOn Track
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from lbendlin , please allow me to provide another insight:

Hi, @KR300 
Thanks for reaching out to the Microsoft fabric community forum.

Regarding the issue you raised, my solution is as follows:

1.Firstly, I referenced your data:

vlinyulumsft_0-1735111245590.png

2.Secondly, I created the following measures:

color = 
VAR aa =
    SUMMARIZE (
        'Table',
        'Table'[Is Final Round],
        'Table'[Stage],
        'Table'[Stage Status],
        "color",
            IF (
                'Table'[Is Final Round] = TRUE ()
                    && [Stage Status] = "Success",
                "Green",
                IF (
                    'Table'[Is Final Round] = TRUE ()
                        && [Stage Status] = "Unsuccess",
                    "Red",
                    IF (
                        'Table'[Is Final Round] = TRUE ()
                            && [Stage Status] = "In Progress",
                        "Yellow",
                        BLANK ()
                    )
                )
            )
    )
VAR bb =
    MAXX ( FILTER ( aa, 'Table'[Stage] = MAX ( 'Table'[Stage] ) ), [color] )
RETURN
    IF ( ISBLANK ( bb ), "white", bb )

3.Then, I modified the visual settings as follows:

 

vlinyulumsft_1-1735111298143.png

vlinyulumsft_2-1735111298144.png

vlinyulumsft_3-1735111312900.png

4.Here's my final result, which I hope meets your requirements.

vlinyulumsft_4-1735111352259.png

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

Thanks for the reply from lbendlin , please allow me to provide another insight:

Hi, @KR300 
Thanks for reaching out to the Microsoft fabric community forum.

Regarding the issue you raised, my solution is as follows:

1.Firstly, I referenced your data:

vlinyulumsft_0-1735111245590.png

2.Secondly, I created the following measures:

color = 
VAR aa =
    SUMMARIZE (
        'Table',
        'Table'[Is Final Round],
        'Table'[Stage],
        'Table'[Stage Status],
        "color",
            IF (
                'Table'[Is Final Round] = TRUE ()
                    && [Stage Status] = "Success",
                "Green",
                IF (
                    'Table'[Is Final Round] = TRUE ()
                        && [Stage Status] = "Unsuccess",
                    "Red",
                    IF (
                        'Table'[Is Final Round] = TRUE ()
                            && [Stage Status] = "In Progress",
                        "Yellow",
                        BLANK ()
                    )
                )
            )
    )
VAR bb =
    MAXX ( FILTER ( aa, 'Table'[Stage] = MAX ( 'Table'[Stage] ) ), [color] )
RETURN
    IF ( ISBLANK ( bb ), "white", bb )

3.Then, I modified the visual settings as follows:

 

vlinyulumsft_1-1735111298143.png

vlinyulumsft_2-1735111298144.png

vlinyulumsft_3-1735111312900.png

4.Here's my final result, which I hope meets your requirements.

vlinyulumsft_4-1735111352259.png

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

 

lbendlin
Super User
Super User

What's a shape visual ?

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.