Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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.

Reply
Anne_Vyolett
New Member

Regex for extracting a particular string in the records of a Column

Need to extract a particular alphanumeric string from the records of a column.Add a new column in the report for the extracted values and add to the visual.

 

For Example:  Swift/Bic:STRULM23L is the string to be extract from every records of a column which has many alphanumeric values and add it to the another new column.This Swift/Bic:STRULM23L differs in every record as BIC/Swift:STRULM23 or Swift/Bic Code :VBTYSI890 ETC...

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anne_Vyolett ,

 

If you're getting consistent strings in your data, you can just consider using the calculated columns find() and mid() to get the strings

Create calculated column.

Column =
var _swift=
FIND(
    "Swift",'Table'[Column1],1,BLANK())
var _bic=
FIND(
    "Bic",'Table'[Column1],1,BLANK())
RETURN
IF(
    _swift<_bic,
    MID('Table'[Column1],_swift,19),
    MID('Table'[Column1],_bic,19
))

vyangliumsft_0-1724292287976.png

If the string to be fetched is not fixed, you may consider calling a Python script to process the data using regular expressions, check out the blog on steps:

Using regular expressions in power bi desktop - Microsoft Fabric Community

 

This is the related document, you can view this content:

Solved: Extraction of multiple 7 characters text substring... - Microsoft Fabric Community

Solved: Extract Values From a List of Records - Microsoft Fabric Community

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @Anne_Vyolett ,

 

If you're getting consistent strings in your data, you can just consider using the calculated columns find() and mid() to get the strings

Create calculated column.

Column =
var _swift=
FIND(
    "Swift",'Table'[Column1],1,BLANK())
var _bic=
FIND(
    "Bic",'Table'[Column1],1,BLANK())
RETURN
IF(
    _swift<_bic,
    MID('Table'[Column1],_swift,19),
    MID('Table'[Column1],_bic,19
))

vyangliumsft_0-1724292287976.png

If the string to be fetched is not fixed, you may consider calling a Python script to process the data using regular expressions, check out the blog on steps:

Using regular expressions in power bi desktop - Microsoft Fabric Community

 

This is the related document, you can view this content:

Solved: Extraction of multiple 7 characters text substring... - Microsoft Fabric Community

Solved: Extract Values From a List of Records - Microsoft Fabric Community

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors