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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
CharC
Frequent Visitor

Extract text between delimiters that contain special character

Hi, 

I have an excel file exported from MS Planner. The file is a list of tasks.

There's a column called "Description", which is description of the task, which is a multi-line text column.

In the tasks on Planner, sometimes strings are bolded. The bolded strings have the asterisks ** around them in the "Description" column in the excel file.

 

I want to extract NAME 1 in the below example, where "Round 1" and "Round 2" are bolded in the tasks (have ** around them in excel):

**Round 1** - NAME 1

**Round 2** - Name 2

 

When I tried Text.BetweenDelimiters([Description], "**Round 1** - ", **Round 2**") to extract NAME 1, it gives me null.

 

I've also tried removing ** as a step and then do Text.BetweenDelimiters([#"Description-clean"], "Round 1", "Round 2"), it still gives me null.

 

How can I extract NAME 1 in this case?

 

2 ACCEPTED SOLUTIONS
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

View solution in original post

dufoq3
Super User
Super User

Hi @CharC ,

 

Result

dufoq3_0-1721242144327.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W0tIKyi/NS1Ew1NJS0FXwc/R1VTBUitVBSBhBJBJzUxWMlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Hours = _t]),
    #"Inserted Text After Delimiter" = Table.AddColumn(Source, "Text After Delimiter", each Text.AfterDelimiter([Hours], " - "), type text)
in
    #"Inserted Text After Delimiter"

Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

View solution in original post

4 REPLIES 4
dufoq3
Super User
Super User

Hi @CharC ,

 

Result

dufoq3_0-1721242144327.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W0tIKyi/NS1Ew1NJS0FXwc/R1VTBUitVBSBhBJBJzUxWMlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Hours = _t]),
    #"Inserted Text After Delimiter" = Table.AddColumn(Source, "Text After Delimiter", each Text.AfterDelimiter([Hours], " - "), type text)
in
    #"Inserted Text After Delimiter"

Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

CharC
Frequent Visitor

Thank you for your reply. Does it mean I need to load the xlsx file as json? 

No, read note below my post.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.