Forum Discussion
bolabuga
9 years agoHelper V
Using count with search text in column.
Hello everyone, I would like helping for counting a specific amount of services in a table. i will list the sample. SERVICE CODE OBS
2652016000002 102023 XXXXXXXXXXXXXXXXXXX Alt.TL: de A ...
- 9 years ago
You could do it like this:
Custom Column:
ContainsText = SEARCH("Alt.TL: de A p/ B",[OBS],1,0)Measure:
MyCount = CALCULATE(COUNTROWS(Codes),FILTER(Codes,Codes[CODE]=102023 && Codes[ContainsText]<>0))
Greg_Deckler
9 years agoCommunity Champion
You could do it like this:
Custom Column:
ContainsText = SEARCH("Alt.TL: de A p/ B",[OBS],1,0)Measure:
MyCount = CALCULATE(COUNTROWS(Codes),FILTER(Codes,Codes[CODE]=102023 && Codes[ContainsText]<>0))
bolabuga
9 years agoHelper V
Hi smoupre, im getting this error:
"The search text provided to the 'SEARCH' function could not be found in the indicated text."
Strange, because i can see the text is there, i even searched for just "A p/ B" and its returning the same error.
- bolabuga9 years agoHelper V
Its working on my example table, i forgot the semicolon on the calculated column. "TEXT = SEARCH("ALT.TL: DE A P/ B";Tabela1[OBS];1;0)"
But its strange, in my main table, the search function is not finding the text, and it is filling everything with zeros.....Any ideas??