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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
msantillan
Helper II
Helper II

Get the Text between delimitters from two columnsc M query

Is it possible to get the text between delimitters based from two columns?

I have this attempt code as an example:

 

Text.BetweenDelimiters(([Try1] and [Try2]), "try_", "_code")

 

Basically, I have two collumns which contains countless rows of either try_(get)_code and try2_(get)_code, and I only want to get the value of "(get)" from those in between try and code. Do note that (get) may vary and is just an example. The code above doesn't work. Any ideas?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@msantillan 

You can just used the extact feature in query editor.
between.JPG

 


Paul Zheng _ Community Support Team
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

2 REPLIES 2
Anonymous
Not applicable

@msantillan 

You can just used the extact feature in query editor.
between.JPG

 


Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi,

 

If you want, you can do it in edit query.

Create a blank query any type in this query in advanced editor so you can see the logic.

 

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKimqjE8sTgEjJR0lQyPj+OT8lFSlWB2IHFDA0AgoYW5hboEqA9RibAKUychKz8DQAxTPz8zPRBVPKk5JMwTKmJqYQSViAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Try1 = _t, Try2 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Try1", type text}, {"Try2", type text}}),
#"Inserted Merged Column" = Table.AddColumn(#"Changed Type", "Merged", each Text.Combine({[Try1], [Try2]}, ""), type text),
#"Extracted Text Between Delimiters" = Table.TransformColumns(#"Inserted Merged Column", {{"Merged", each Text.BetweenDelimiters(_, "_", "_"), type text}})
in
#"Extracted Text Between Delimiters"

 

/Adam

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
Top Kudoed Authors