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
zivhimmel
Resolver I
Resolver I

Use Bold characters based on condition

Hi,

Is there any way, in a calculated column or measure, to bold the text if some condition takes place.

Say, if the length of the string is lower than 10, use bold charachters?

Doesn't have to be bold, could be any other way that will make the text stand out.

Thanks.

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

If the string is in a measure you can do it.  In my example [Month_Name] is a measure

Month_Name = SELECTEDVALUE( Dates[Month Name] )

Then I have another measure for the formatting

Month Name Format = IF ( LEN ( [Month_Name] ) <= 5, "Red" )

That gets applied to the [Month_Name] measure.

stringformat.jpg

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

If the string is in a measure you can do it.  In my example [Month_Name] is a measure

Month_Name = SELECTEDVALUE( Dates[Month Name] )

Then I have another measure for the formatting

Month Name Format = IF ( LEN ( [Month_Name] ) <= 5, "Red" )

That gets applied to the [Month_Name] measure.

stringformat.jpg

Thanks @jdbuchanan71 !

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.