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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
nalinda116
Regular Visitor

Conditional column using text string

Hi,

 

I have a data base which include debt follow-up remarks (calls) written in unstructured manner. I need to create a new/ conditional column to classify them in to 03 categories as "effective", "not effective", "some what effective". I have identified texts that represent each classifications e.g. not effective= "cut the call", "phone not working", "number unreachable", "incorrect number".... like wise there can be 40-50 terms for each category (i can put them to a table).

 

Using conditional column option is one solution but has the following shortcomings;

1. It is time consuming considering number of text for each category.

2. It allows only 02 outcome/ classification, here i need 03

3. It is case sensitive and here i don't prefer it

 

Could anyone give a solution?

 

Thanks you!

 

Capture.PNG

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @nalinda116 

Or create a match table,

Capture13.JPG

Then merge it in the original data,

Capture12.JPG

After expand, there are some wrong rows, create a custom column,

Capture14.JPG

Capture15.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@nalinda116 , Not sure I got it. create a color measure using min/max of first nonblank on category column like this

 

Color Date = if(FIRSTNONBLANK(Table[date],TODAY()) <today(),"lightgreen","red")
if(FIRSTNONBLANK(Table[Value],"true") "true","green","red")

Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK(Table[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Color = if(FIRSTNONBLANK(Table[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))

 

Then in conditional formatting use field option and use this measure

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...

https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

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

Thanks for the reply!

 

But in involves "text" reading. I updated the original post with an example.

Hi @nalinda116 

You could use conditional column in Transform data.

Capture11.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.