我不知道是否有办法做到这一点,但我们可以尝试验证 column1 中有多少单词出现在 column2 中:
CheckIfTrue__ =
VAR SplitByCharacter = " "
VAR Org = SELECTEDVALUE(Sheet3[A header])
VAR CurrentF = SELECTEDVALUE(Sheet3[Another header] )
VAR Table0 =
SELECTCOLUMNS(
ADDCOLUMNS (
GENERATE (
ROW ( "Text", Org),
VAR TokenCount =
PATHLENGTH ( SUBSTITUTE ( [Text], SplitByCharacter, "|" ) )
RETURN
GENERATESERIES ( 1, MAX(TokenCount,1) )
),
"Word", PATHITEM ( SUBSTITUTE ( [Text], SplitByCharacter, "|" ), [Value] )
),
"Word",[Word])
VAR Table1 =
SELECTCOLUMNS(
ADDCOLUMNS (
GENERATE (
ROW ( "Text", CurrentF),
VAR TokenCount =
PATHLENGTH ( SUBSTITUTE ( [Text], SplitByCharacter, "|" ) )
RETURN
GENERATESERIES ( 1, MAX(TokenCount,1) )
),
"Word", PATHITEM ( SUBSTITUTE ( [Text], SplitByCharacter, "|" ), [Value] )
),
"Word",[Word])
RETURN
COUNTROWS(INTERSECT(Table0, Table1))+0