Forum Discussion
How to search a string inside a text field ?
- 5 years ago
Anonymous , Then Search, find and containssting should work
if(SEARCH("nfr",[Summary],,0)>0,1,0) //Search is case-insensitive , so no need pf lower
- Anonymous5 years ago
Hi Anonymous
You may use CONTAINSSTRING function or Search function (like amitchandak replied before) to build measure or calculated column to find "NFR" in text field. And Find function will recognize letter case, so the result is incorrect.
I build a sample table to have a test.
Measure:
Find NFR 2 = IF(CONTAINSSTRING(MAX('Table'[Summary]),"NFR"),1,0)Calculated column:
C_Find NFR = IF(CONTAINSSTRING('Table'[Summary],"NFR"),1,0)Result:
You can download the pbix file from this link: How to search a string inside a text field ?
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
You may use CONTAINSSTRING function or Search function (like amitchandak replied before) to build measure or calculated column to find "NFR" in text field. And Find function will recognize letter case, so the result is incorrect.
I build a sample table to have a test.
Measure:
Find NFR 2 = IF(CONTAINSSTRING(MAX('Table'[Summary]),"NFR"),1,0)
Calculated column:
C_Find NFR = IF(CONTAINSSTRING('Table'[Summary],"NFR"),1,0)
Result:
You can download the pbix file from this link: How to search a string inside a text field ?
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.