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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.