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
SK78
Frequent Visitor

Query looking for specific characters (not static position) but has variables after the delimiter

Looking for help with a query:

I have a record set as below, trying to achieve a result such that the query return the values GT-XXXX into a new column. The position of GT-XXXX in the cell is not static. Also note the value of XXXX is variable. 

SK78_1-1644072061935.png

Any help in this regard would be greatly appreciated. I am trying to achieve a result that translates into 

SK78_2-1644072290585.png

Thanks!

1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @SK78 ,

 

I got this result:

tomfox_1-1644077372449.png

 

Here the code in Power Query M that you can paste into the advanced editor (if you do not know, how to exactly do this, please check out this quick walkthrough)

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ZY9LDoMwDETvwtqWYsfOR10BRXSDEiF2iPtfo0CrJlFXHsvPM/a+d33ux+eUkaNA0VppB/OGwTEMY1oYiVQE1m1F8mxsd0AxsYagaP5f1AYXfxGWLeQloQSVZqxGIlRNuGjmaOA1DjOScoApIYm2tkq3LZUnlM+ERxXxvYgpuB9E8ZNA/qwF8NVxxxs=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [customfield_all_links = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"customfield_all_links", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each "GT-" & Text.BetweenDelimiters([customfield_all_links], "GT-", ","))
in
    #"Added Custom"

 

Alternatively, you can add a custom column and use this code snippet:

"GT-" & Text.BetweenDelimiters([customfield_all_links], "GT-", ",")

 

Let me know if it helps 🙂

 

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 

 

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

2 REPLIES 2
SK78
Frequent Visitor

@tackytechtom - Thank you - Works perfect!! 

tackytechtom
Super User
Super User

Hi @SK78 ,

 

I got this result:

tomfox_1-1644077372449.png

 

Here the code in Power Query M that you can paste into the advanced editor (if you do not know, how to exactly do this, please check out this quick walkthrough)

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ZY9LDoMwDETvwtqWYsfOR10BRXSDEiF2iPtfo0CrJlFXHsvPM/a+d33ux+eUkaNA0VppB/OGwTEMY1oYiVQE1m1F8mxsd0AxsYagaP5f1AYXfxGWLeQloQSVZqxGIlRNuGjmaOA1DjOScoApIYm2tkq3LZUnlM+ERxXxvYgpuB9E8ZNA/qwF8NVxxxs=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [customfield_all_links = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"customfield_all_links", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each "GT-" & Text.BetweenDelimiters([customfield_all_links], "GT-", ","))
in
    #"Added Custom"

 

Alternatively, you can add a custom column and use this code snippet:

"GT-" & Text.BetweenDelimiters([customfield_all_links], "GT-", ",")

 

Let me know if it helps 🙂

 

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 

 

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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