Forum Discussion
How to extract continuous string set from a column with multiple criteria
- 5 years ago
Anonymous - OK, I updated this with a Client Name output version and Project output version in 2 additional columns. I checked the matches, don't see anything obviously amiss. Solved?
PBIX is attached.
Greg_Deckler Thanks for your reply. Lets say table 1 and 2 are Table A and B respectively. I do not need to do a fuzzy search. Casey's shourd return just Casey since the first 5 characters are matching with the search text.
I need to create a new column (Result) and not a table which retrievs the searched value. Lets say this new column is to be created in Table A beside the 'Client Name' column. So it picks up the search terms from Table B, searches for a continuous string match with the 'Client Name' column and fills in the 'Result' column.
Not a fuzzy search but a continuous string search (Exactly just like how a filter search on a column in excel works).
Anonymous Check out my second reply, I proved the technique will work, there is an attached PBIX file.
- Anonymous5 years agoNot applicable
Greg_Deckler Thank you so much for the solution. It almost fizes my issue. But I just need a small extension to this. I apologise for not mentioning it earlier.
Table A Table B
BARCALAYS Corporation Ltd Barcalays (LLP)
CaSey's CaseyLLP
I need the result to be retrieved in the result columns as "Barcalays" -> case insensitive and just like how the search field works in an excel filter. For Caseys the result should be "Casey".
- Greg_Deckler5 years agoCommunity Champion
Anonymous - I believe, see updated PBIX attached.
Column = VAR __ClientName = [Client Name] VAR __Table = ADDCOLUMNS( ADDCOLUMNS( 'Table (24a)', "Search",SEARCH([Ongoing Projects],__ClientName,,0) ), "Result",IF([Search]>0,[Ongoing Projects],BLANK()) ) RETURN MAXX(__Table,[Result])- Anonymous5 years agoNot applicable
Greg_Deckler Hi Greg, I dont see any changes in the latest PBIX. It is same as the earlier one. The parent tables are also the same as the earlier one with no changes for Barcalays (LLP) and CaSey. Probably you missed on attaching the updated PBIX.