Forum Discussion
nehapowerbi
3 years agoNew Member
Power BI Conditional formatting format only one row based on row category
HI, I am trying to create a simple Employee table where I have yearly counts for male and female for last few years . I have created a measure to show percentages of male female by year as a measur...
- 3 years ago
You can write a measure to read the gender and return a formatting color for only F.
Format Female = VAR _Gender = SELECTEDVALUE ( Table[Gender] ) = "F" RETURN IF ( _Gender, IF ( [Gender%] > .3, "Green", "Red" ) )Formate the measure as text then apply it as conditional formatting to the % measure.
My sample data has Female/Male rather than F/M
jdbuchanan71
3 years agoSuper User
You can write a measure to read the gender and return a formatting color for only F.
Format Female =
VAR _Gender = SELECTEDVALUE ( Table[Gender] ) = "F"
RETURN
IF ( _Gender, IF ( [Gender%] > .3, "Green", "Red" ) )
Formate the measure as text then apply it as conditional formatting to the % measure.
My sample data has Female/Male rather than F/M
we-out-here
1 year agoRegular Visitor
Excellent solution. Am I to understand that Power BI thus automatically interprets the strings "Red" and "Green" into their appropriate colors? Is there a list of what colors with which this can be done? Or any other similar tricks?
I hope it's appropriate to ask here.