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
Anonymous
Not applicable

Split text to column by text without delimiter

hi,

I have the text string as below from html table.

It has no delimiter, please help me to extrac them into columns as below:

 

Problem:

Contract: ABCLocation: USADate Start: 2020Date End: 2021Requester: Mr SmithCode: 01

Contract: XYZLocation: AmerciaSDate Start: 01/07/2019Date End: 01/01/2022Requester: Jim BoCode: 0100

 

Required solution:

Contract Requester Location
ABC        Mr Smith  USA
XYZ        Jim Bo       Amercia

I have tried this solution but my dax knowledge is limited and cant make it works.

https://community.powerbi.com/t5/Desktop/Split-column-in-multiple-columns-based-on-text/m-p/2034418#...

 

thanks in advance.

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try these DAX columns:

Contract = 
    VAR __Start = SEARCH(" ",[Column]) + 1
    VAR __End = SEARCH("Location:",[Column])
RETURN
    MID([Column],__Start,__End - __Start)


Requestor = 
    VAR __Start = SEARCH("Requester: ",[Column]) + LEN("Requester: ")
    VAR __End = SEARCH("Code:",[Column])
RETURN
    MID([Column],__Start,__End - __Start)


Location = 
    VAR __Start = SEARCH("Location: ",[Column]) + LEN("Location: ")
    VAR __End = SEARCH("Date Start:",[Column])
RETURN
    MID([Column],__Start,__End - __Start)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try these DAX columns:

Contract = 
    VAR __Start = SEARCH(" ",[Column]) + 1
    VAR __End = SEARCH("Location:",[Column])
RETURN
    MID([Column],__Start,__End - __Start)


Requestor = 
    VAR __Start = SEARCH("Requester: ",[Column]) + LEN("Requester: ")
    VAR __End = SEARCH("Code:",[Column])
RETURN
    MID([Column],__Start,__End - __Start)


Location = 
    VAR __Start = SEARCH("Location: ",[Column]) + LEN("Location: ")
    VAR __End = SEARCH("Date Start:",[Column])
RETURN
    MID([Column],__Start,__End - __Start)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.