Forum Discussion
Anonymous
4 years agoNot applicable
Finding matching substring with DAX
I have two tables "Sentences" and "Words". My goal is to add a calculated column/measure to the "Sentences" table, which contains the words that also occur in the Words table. The "Sentenc...
- 4 years ago
Hi,
From the 1 column Words table, build a 3 column table with the original, English and Spanish columns. Modify my calculated column formula to:
Words found = CONCATENATEX(FILTER(VALUES(words[Words]),CONTAINSSTRING(sentences[text],words[English])),words[Words],",")Hope this helps.
DouweMeer
4 years agoImpactful Individual
Probably a combination of containsstring, concatenatex, and, personally, selectcolumns.
selectcolumns(
'table sentences'
, "Id" , 'table sentences'[Id]
, "Text" , 'table sentences'[text]
, "Words"
, concatenatex (
filter ( 'table words'
, containsstring ( 'table sentences'[text] , 'table words'[words] )
)
, 'table words'[words]
, ", "
)
)Haven't tried it, I may have missed misspelled something.
Anonymous
4 years agoNot applicable
I have tried it, but unfortuanatelly received this error message:
Is there a different solution?
- DouweMeer4 years agoImpactful Individual
Looking at the accepted solution, your proposed of two tables in to one was meant as an addition on the first. I thought you wanted a third table.
If you would put what I wrote into a new custom table, it should work.