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.
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])
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.
- Greg_Deckler5 years agoCommunity Champion
Anonymous - Not sure, I thought I attached the one attached here. Here is the screen shot:
I just saved and attached again.
- Anonymous5 years agoNot applicable
Ge
Greg_DecklerI dont see any changes in this screenshot as well (even checked the file).
Here is the exact problem statement.
Replace Table 24(a) Barclays with Barclays (ABC)
Replace Table 24[Client Name] Casey's General with CaSey General
Replace Table24[Client Name] ASTRAZENCALimited with 2020 ASTRAZENCALimited AMT
Now I want the result to show as Barclays, Casey, Astrazenca
The result should be the complete set of matching characters including space and special characters if any and not the value from the Table 24(a). (For ex: Casey)
I am not really sure if we need to implement fuzzy search. I have not explored much of it.- Greg_Deckler5 years agoCommunity Champion
Anonymous - OK, I guess I was confused because you have the PBIX and can make those changes on your own?
The only change that I could not make was to have Barclays (ABC) match BARCLAYS (LLP) because those two things do not match. It would have to match on Barclays<=>BARCLAYS which it does and returns Barclays. There is no fuzzy matching with FIND. It is only case-insensitive.
Not the formula. It is returning in the column whatever search word (Project) matches the current row. It is not doing anything with regard to manipulating the text in Client Name, it simply returns the matching Ongoing Project value. So, you can put whatever you want in Table24 as far as extra characters, etc. it doesn't matter one tiny bit, as long as a match is found in Table (24a) then that match is returned as the value. I made no changes to the code, just the changes to the data tables, which you have the PBIX, you can do that.