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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

need help on conditional formatting

Lucasw_0-1657736366085.png

Here is my table visual, I want to apply conditional formatting to each row to see if we meet our target every month. I know field value might work, but I don't know how to set up a field value. Please help!!! My brain doesn't work LOL, I was stuck here for 2 days. Really need help.

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Conditional formatting of bolded text is not currently supported, please submit your ideas here.

 

https://ideas.powerbi.com/ideas/ 

 

Best Regards,
Winniz

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I think if I can create a measure that only contains one row, then it's ok to use it to set up the field value. 

here is my code. But I don't know why it affects all the rows.....

color =
VAR result =
CALCULATE(SELECTEDVALUE('CORP KPIs'[NJan]), ALLSELECTED('CORP KPIs'[NJan]))
VAR R =
IF(result <= 225, "Green","red")
return R

Hi @Anonymous ,

 

If your months are columns in the table, then you have to create separate measures for each month. Take January as an example.

 

Jan_Color = 
IF (
    SELECTEDVALUE ( 'CORP KPIs 1'[ID] ) = "CAPA aging",
    IF ( SUM ( 'CORP KPIs 1'[Jan] ) <= 225, "Green", "Red" )
)

vkkfmsft_2-1658113386609.png

 

If you want to do this in a measure, then you need to unpivot these month columns in Power Query and then create the measure.

 

vkkfmsft_0-1658112787724.png

vkkfmsft_1-1658112820345.png

color = 
IF (
    SELECTEDVALUE ( 'CORP KPIs 2'[ID] ) = "CAPA aging",
    IF ( SELECTEDVALUE ( 'CORP KPIs 2'[Value] ) <= 225, "Green", "Red" )
)

vkkfmsft_3-1658113394205.png

 


If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Anonymous
Not applicable

Hi V,

Thank you for reply this. 

Do you know if there is a way to bold a single column?

 

Hi @Anonymous ,

 

Conditional formatting of bolded text is not currently supported, please submit your ideas here.

 

https://ideas.powerbi.com/ideas/ 

 

Best Regards,
Winniz

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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