If you ever want to compare 2 words character by character then you can use this:
col =
VAR FirstWord =
LOWER ( Colors[Colors] )
VAR SecondWord =
LOWER ( Colors[Column] )
VAR FirstWordNumSeries =
GENERATESERIES ( 1, LEN ( FirstWord ), 1 )
VAR SecondWordNumSeries =
GENERATESERIES ( 1, LEN ( SecondWord ), 1 )
VAR FirstWordCharacters =
SELECTCOLUMNS (
ADDCOLUMNS ( FirstWordNumSeries, "FW", MID ( FirstWord, [Value], 1 ) ),
"@FW", [FW]
)
VAR SecondWordCharacters =
SELECTCOLUMNS (
ADDCOLUMNS ( SecondWordNumSeries, "SW", MID ( SecondWord, [Value], 1 ) ),
"@SW", [SW]
)
VAR Result =
IF (
COUNTROWS ( FILTER ( FirstWordCharacters, [@FW] IN SecondWordCharacters ) ) > 0,
TRUE (),
FALSE ()
)
RETURN
Result
.
Common words =
VAR FirstWord = LOWER( Colors[Colors] )
VAR SecondWord = LOWER( Colors[Column] )
VAR FirstWordNumSeries =
GENERATESERIES ( 1, LEN ( FirstWord ), 1 )
VAR SecondWordNumSeries =
GENERATESERIES ( 1, LEN ( SecondWord ), 1 )
VAR FirstWordCharacters =
SELECTCOLUMNS (
ADDCOLUMNS ( FirstWordNumSeries, "FW", MID ( FirstWord, [Value], 1 ) ),
"@FW", [FW]
)
VAR SecondWordCharacters =
SELECTCOLUMNS (
ADDCOLUMNS ( SecondWordNumSeries, "SW", MID ( SecondWord, [Value], 1 ) ),
"@SW", [SW]
)
VAR Result =
CONCATENATEX( FILTER ( FirstWordCharacters, [@FW] IN SecondWordCharacters ), [@FW], ", " )
RETURN
Result