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
buzzkoi69
Frequent Visitor

Search multiple text in one column

I'm trying to search multiple text in a column and to categorize it accordingly. 

for

Capture1.JPG

and I'm currently using:

Capture.JPG

 

The output should be like below:

PROCEED TO SEMESTER 2 = PROCEED TO SEMESTER

PROCEED TO SEMESTER 2 AND REPEAT FAILED MODULE(S) IN JULY 2018 = PROCEED TO SEMESTER AND TO REPEAT

 

However using the Calculation its not giving me the right category, help me please...

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

is it a measure or a column

The first condition you have to split

 

Search("Proceed to Semester",[Column],1,0)>0 && Search("To Repeat",[Column],1,0)>0

 

Change column name and text as per need

 

View solution in original post

4 REPLIES 4
v-alq-msft
Community Support
Community Support

Hi, @buzzkoi69 

 

Based on your description, I created data to reproduce your scenario.

Academic Progress:

a1.png

 

You may create a measure as below.

 

Result = 
var _value = SELECTEDVALUE('Academic Progress'[Recomendation])
return
SWITCH(
    TRUE(),
    CONTAINSSTRINGEXACT(_value,"PROCEED TO SEMESTER")&&CONTAINSSTRINGEXACT(_value,"AND REPEAT"),"PROCEED TO SEMESTER AND TO REPEAT",
    CONTAINSSTRINGEXACT(_value,"TERMINATION"),"TERMINATION",
    CONTAINSSTRINGEXACT(_value,"PROCEED TO SEMESTER")&&NOT(CONTAINSSTRINGEXACT(_value,"TO REPEAT")),"PROCEED TO SEMESTER",
    BLANK()
)

 

 

Result:

a2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Hi @v-alq-msft Thank you, will try this solution as well!

amitchandak
Super User
Super User

is it a measure or a column

The first condition you have to split

 

Search("Proceed to Semester",[Column],1,0)>0 && Search("To Repeat",[Column],1,0)>0

 

Change column name and text as per need

 

@amitchandak It works! Thank you so much for your help

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.