Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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
Solved! Go to Solution.
The following method is for your reference:
Sample:
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:
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.
The following method is for your reference:
Sample:
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:
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.
This will not help as adding space in YourTable[YourColumn] will become " Welcome: This is agressiveness behaviour "
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!!
Proud to be a Super User! | |
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 69 | |
| 32 | |
| 32 | |
| 32 |