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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
meenakshiramdeo
Frequent Visitor

Find exact substring in string/description

I want to search for exact string in a column and then get a true or false result.

For eg If I have to search "AGRESSIVE" or "CLIENT Not" in  

"Welcome: This is agressiveness behaviour"

 

I am currently using CONTAINS function and it gives me true as agressiveness has AGRESSIVE but I need false so if exact search exist then  only result should be true and false in below case like -

"Aagressive"

"agressiveness"

 

 

Thanks

Meenakshi Ramdeo

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @meenakshiramdeo 

 

The following method is for your reference:

 

Sample:

vxuxinyimsft_0-1717998922194.png

 

Create a measure as follows

Measure = IF(CONTAINSSTRINGEXACT("aggressive", MAX([Column])), "True", "False")

 

or a calculated column as follows

Column 1 = IF(CONTAINSSTRINGEXACT("aggressive", [Column]), "True", "False")

 

Output:

vxuxinyimsft_1-1717999038949.png

 

Best Regards,
Yulia Xu

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @meenakshiramdeo 

 

The following method is for your reference:

 

Sample:

vxuxinyimsft_0-1717998922194.png

 

Create a measure as follows

Measure = IF(CONTAINSSTRINGEXACT("aggressive", MAX([Column])), "True", "False")

 

or a calculated column as follows

Column 1 = IF(CONTAINSSTRINGEXACT("aggressive", [Column]), "True", "False")

 

Output:

vxuxinyimsft_1-1717999038949.png

 

Best Regards,
Yulia Xu

 

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

meenakshiramdeo
Frequent Visitor

This will not help as adding space in YourTable[YourColumn] will becomeWelcome: This is agressiveness behaviour "

rajendraongole1
Super User
Super User

Hi @meenakshiramdeo - Can you try below dax function Contrainstring to get the exact string match

ExactMatch =
IF (
OR (
CONTAINSSTRING(" " & YourTable[YourColumn] & " ", " AGRESSIVE "),
CONTAINSSTRING(" " & YourTable[YourColumn] & " ", " CLIENT Not ")
),
TRUE(),
FALSE()
)

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.

Top Solution Authors