Forum Discussion
Find string matches from a separate table
- 5 years ago
MichaelHutchens why you have partial code, my code is way too long, not sure if you are not seeing the full code:
Word Found Count = VAR __word = SUBSTITUTE ( 'Application'[Name], " ", "|" ) VAR __wordTable = GENERATESERIES ( 1, PATHLENGTH ( __word ) ) VAR __wordsTable = ADDCOLUMNS ( __wordTable, "@Word", PATHITEM ( __word, [Value] ) ) VAR __add1 = ADDCOLUMNS ( __wordsTable, "Found Count", SUMX ( 'Description', VAR __desc = SUBSTITUTE ( 'Description'[Description], " ", "|" ) VAR __descTable = GENERATESERIES ( 1, PATHLENGTH ( __desc ) ) VAR __descTableWord = ADDCOLUMNS ( __descTable, "@Description", PATHITEM ( __desc, [Value] ) ) VAR __descValues = SELECTCOLUMNS ( __descTableWord, "@Description", [@Description] ) RETURN ( [@Word] IN __descValues ) + 0 ) ) RETURN CONCATENATEX ( __add1, [Found Count], "," )Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
MichaelHutchens why you have partial code, my code is way too long, not sure if you are not seeing the full code:
Word Found Count =
VAR __word = SUBSTITUTE ( 'Application'[Name], " ", "|" )
VAR __wordTable = GENERATESERIES ( 1, PATHLENGTH ( __word ) )
VAR __wordsTable = ADDCOLUMNS ( __wordTable, "@Word", PATHITEM ( __word, [Value] ) )
VAR __add1 =
ADDCOLUMNS ( __wordsTable,
"Found Count",
SUMX (
'Description',
VAR __desc = SUBSTITUTE ( 'Description'[Description], " ", "|" )
VAR __descTable = GENERATESERIES ( 1, PATHLENGTH ( __desc ) )
VAR __descTableWord = ADDCOLUMNS ( __descTable, "@Description", PATHITEM ( __desc, [Value] ) )
VAR __descValues = SELECTCOLUMNS ( __descTableWord, "@Description", [@Description] )
RETURN
( [@Word] IN __descValues ) + 0
)
)
RETURN
CONCATENATEX ( __add1, [Found Count], "," )
Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Apologies, my fault completely parry2k 🙂 Your original response works perfectly - thanks so much, I really appreciate it! 🙂