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 ,
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.