Forum Discussion
Count Keywords in Summary Column from another table
- 4 years ago
Hi Lebunim ,
You can try use substitute() to replace the word in this summary string to null. Then calculate the reduced number of characters, finally divide it by the length of keyword.
Modify the measure to suit your mode.
count word = VAR _text = FIRSTNONBLANK ( 'Table 2 - Incidents'[text], 1 ) VAR _len_text = LEN ( _text ) VAR _len_key = LEN ( [Keywords] ) VAR _substitute = LEN ( SUBSTITUTE ( _text, [Keywords], "" ) ) RETURN DIVIDE ( _len_text - _substitute, _len_key )Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Lebunim ,
Create a measure like below:-
Count of word appearance =
COUNTROWS (
FILTER (
_Incidents,
CONTAINSSTRING ( _Incidents[Summary], MAX ( _Keyword[Keywords] ) )
)
) + 0Output:-
Thanks,
Samarth
What does the MAX represent in above example. I'm getting some values but not exactly as I would expect it.
This measure returns rows with "exact" match of the Keyword, it does not identify a keyword in between other text.....
Example 1 : would count "application"
Example 2 : would not count " my new application is down"
I'm not sure why but it seems the above measure counts rows with exact match of the keyword, anything with additional text is being skipped....
Any ideas?