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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Learner22
Helper I
Helper I

Different color if string starts with specific charackter

Dear Community,

 

I need your help. Image I have the following column

 

Column A

_XT

AB

_BT

CC

_TT

 

I want to use Column A as a slicer. If the text in the column A begins with _ (for example _XT) then I want to have for example the color green for this text.

How can I do this?

 

Many thanks.

1 ACCEPTED SOLUTION

Hi @Learner22 ,

 

Once you create the measure. 

1. Drag this column on to the report page. 

2. Once added, go to the visulisation pane on the right which is before the fields pane.

3. You'll see a tab as columns below in the visualisation pane, and you'll see column A there.

4. click on the down row which is there with the column A and select conditional formatting and it that select background color.

5. After that a pop up box will appear as below,

NikhilChenna_0-1669288503981.png

6. In the first drop down select the Format style as field value. 

7. After that select the measure which is created in the drop for this question " What field should we base this on ?"

NikhilChenna_1-1669288568248.png

8. After that click on Ok and its done. 

 

Follow this below links if you do not understand the steps - 

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting

 

Regards, 
Nikhil Chenna

 

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Learner22 , Not clear on the role if the slicer here, but you have conditional formatting using a color measure, use in field value option of conditional formatting

 

If(Left(Max(Table[Column1]), 1) = "_", "Green", "White")

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I'm not clear how to use the created measure in connection with the Column A.

Hi @Learner22 ,

 

Once you create the measure. 

1. Drag this column on to the report page. 

2. Once added, go to the visulisation pane on the right which is before the fields pane.

3. You'll see a tab as columns below in the visualisation pane, and you'll see column A there.

4. click on the down row which is there with the column A and select conditional formatting and it that select background color.

5. After that a pop up box will appear as below,

NikhilChenna_0-1669288503981.png

6. In the first drop down select the Format style as field value. 

7. After that select the measure which is created in the drop for this question " What field should we base this on ?"

NikhilChenna_1-1669288568248.png

8. After that click on Ok and its done. 

 

Follow this below links if you do not understand the steps - 

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting

 

Regards, 
Nikhil Chenna

 

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

Anonymous
Not applicable

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.