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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a query relating to conditional formatting by row I have a screenshot here:
So the Unfavorable, Neutral, and Favorable are just 1 column (I used the count and then show value as a percentage of grand total.)
Naturally when the Favorable hits higher it shows as green but how do I make the Unfavorable responses to be red when it is higher? Since all 3 are just 1 column as shown in the conditional formatting:
Any help or solution would be appreciated! Kindly let me know if there are other details needed to achieve a solution.
Thank you so much! This is much appreciated. I will try this later on and will let you know the results. 🙂
Hi @RLSid17 ,
I have created a simple sample, please refer to it to see if it helps you.
Create 2 measures.
Measure =
VAR _count =
CALCULATE (
COUNT ( 'Table'[result] ),
FILTER (
ALL ( 'Table' ),
'Table'[subject] = SELECTEDVALUE ( 'Table'[subject] )
&& 'Table'[result] = SELECTEDVALUE ( 'Table'[result] )
)
)
VAR _countsubject =
CALCULATE (
COUNT ( 'Table'[subject] ),
FILTER (
ALL ( 'Table' ),
'Table'[subject] = SELECTEDVALUE ( 'Table'[subject] )
)
)
VAR _percent = _count / _countsubject
VAR _maxvalu =
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[subject] = SELECTEDVALUE ( 'Table'[subject] )
),
_percent
)
RETURN
_percent
Measure2 =
VAR _1 =
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[subject] = SELECTEDVALUE ( 'Table'[subject] )
),
[Measure]
)
VAR _2 =
IF (
[Measure] = _1
&& MAX ( 'Table'[result] ) = "Unfavorable",
"Red",
IF (
[Measure] = _1
&& MAX ( 'Table'[result] ) = "Favorable",
"Green",
IF ( [Measure] = _1 && MAX ( 'Table'[result] ) = "Neutral", "Orange", BLANK () )
)
)
RETURN
_2
If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output with more details.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Sorry for the late response, I transformed my data and tried the second measure you provided and this was the result:
This almost works but is there a way for it to format the other columns (Neutral and Unfavorable? For some reason, it is only formatting the Favorable responses. Or rather, only the 1st column is picking up the formatting.
I'm using a Matrix for this to count each responses by column as seen above screenschot.
Hi @Anonymous
I have tried your solution, I think the color works but it is not the count of responses is not totaling to 100% similar to this where I count the 1 column and show value as a percentage of grand total (I used a matrix visual):
I have a workaround where I only change the color where the lower the value is the lighter the color and the higher the value the darker it gets:
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!