Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi - I am struggling to find an efficient way to create a data set from 2 unrelated tables (they cannot be related), with an extract of substring. I am able to successfully pull the substring using this, but it literally takes days to run for only 30k rows. I would love some advice to make this more efficient. Thanks!
Solved! Go to Solution.
Hi @maryg - If the tables are large and the matching process is slow due to the dataset size, consider breaking down your dataset into smaller chunks and processing them separately. also please share the sample data for review .
you can try below approach with variables and check once.
NPNextract =
VAR SearchText = 'August52024'[Case Narrative]
VAR NPNList = 'RTS_IVL_06_25_2024'[NPN]
RETURN
MAXX(
FILTER(
ADDCOLUMNS(
NPNList,
"IsMatch", CONTAINSSTRING(SearchText, [NPN])
),
[IsMatch]
),
[NPN]
)
Hope this helps.
Proud to be a Super User! | |
Hi @maryg ,
Thanks rajendraongole1 for the quick reply. I have some other thoughts to add:
Based on your DAX it looks like you are creating a calculated column.
Measures have better performance as compared to calculated columns, please create a measure according to the following formula.
MEASURE =
CALCULATE (
MAX ( 'RTS_IVL_06_25_2024'[NPN] ),
FILTER (
'RTS_IVL_06_25_2024',
CONTAINSSTRING (
MAX ( 'August52024'[Case Narrative] ),
'RTS_IVL_06_25_2024'[NPN]
)
)
)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @maryg ,
Thanks rajendraongole1 for the quick reply. I have some other thoughts to add:
Based on your DAX it looks like you are creating a calculated column.
Measures have better performance as compared to calculated columns, please create a measure according to the following formula.
MEASURE =
CALCULATE (
MAX ( 'RTS_IVL_06_25_2024'[NPN] ),
FILTER (
'RTS_IVL_06_25_2024',
CONTAINSSTRING (
MAX ( 'August52024'[Case Narrative] ),
'RTS_IVL_06_25_2024'[NPN]
)
)
)
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @maryg - If the tables are large and the matching process is slow due to the dataset size, consider breaking down your dataset into smaller chunks and processing them separately. also please share the sample data for review .
you can try below approach with variables and check once.
NPNextract =
VAR SearchText = 'August52024'[Case Narrative]
VAR NPNList = 'RTS_IVL_06_25_2024'[NPN]
RETURN
MAXX(
FILTER(
ADDCOLUMNS(
NPNList,
"IsMatch", CONTAINSSTRING(SearchText, [NPN])
),
[IsMatch]
),
[NPN]
)
Hope this helps.
Proud to be a Super User! | |
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 38 | |
| 31 | |
| 27 | |
| 26 |