Forum Discussion
Help to make substring extract more efficient - unrelated tables
Hey everyone! I am using some DAX code to extract a substring from a narrative field. I am using a calculated column and my tables are unrelated and cannot be related. What I am using works, but it takes DAYS, and it is about 31,000 rows. I am thinking a calculated table may be better, but I cant figure out how to do that, while extracting a substring. Any thoughts are appreciated! I have googled for a long time and cant seem to get quite what i need. Here is what I am currently doing:
3 Replies
- Greg_Deckler
Community Champion
maryg What does your data look like? Can you provide sample data as text? Also, that code is only going to find the word that is last in the alphabet soooo...
- marygFrequent Visitor
Hi - thanks for the response! Yes, I have gone back and forth ith firstnonblank and this maxx filter and i get back the same results, but always looking for better options! Here is a sample of what my data looks like:
August52024 (table in which i need to add the extracted data in a column - named NPNextract in my code):
~30,000 rows, ~20 columns
the important field here is Case Narrative - this contains free form text and in most instances will have an NPN (which is a 5-8 digit identifier)
RTS_IVL_06_25_2024 (table contains NPN columns i am trying to extract from other table)
~95,000 rows, ~20 columns
NPN is NOT distinct
August52024 Case ID Member Name Case Narrative NPNextract (this is what I am trying to get) 123 John Doe this person is assigned to 012345, blah blah 012345 234 Jane Smith this person is talked to 123456, blah blah no match 456 Mary Jones this person is mentioned 234567, blah blah 234567 RTS_IVL_06_25_2024 NPN Broker Name 012345 Joe White 234567 Sally Black sorry if this is clunky, first time poster!
- marygFrequent Visitor
Hi - was just checking in to see if my data sample helped?