Forum Discussion
Dynamic Fill Color based on Multiple AND Conditions
- Anonymous1 year ago
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:
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:
4.Here's my final result, which I hope meets your requirements.
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.
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:
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:
4.Here's my final result, which I hope meets your requirements.
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.