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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
tonyenglish
New Member

Extracting Text from a text string

Apologies if this has been asked before, but as a newbie to all things Power BI this is proving a bit of a pain.

 

The data I'm working with needs a certain bit of tidying before it's used.  One of the the things that is proving difficult is extracting a certain text string from another - it's easy enough to do in Excel/Access but I'm strugging with it here.

 

What I have is this....

Activity CR
BAU SBCR811c-i TestSBCR811c-i 
R3 SBCR1022b DesignSBCR1022b 
R3 SBCR1227 Requirements GatheringSBCR1227 
BAU SBCR811c-iSBCR811c-i

and in Excel =IFERROR(LEFT(RIGHT(A2,LEN(A2)- FIND("SBCR",A2,1)+1), FIND(" ",RIGHT(A2,LEN(A2)- FIND("SBCR",A2,1)+1))),RIGHT(A2,LEN(A2)- FIND("SBCR",A2,1)+1)) does the trick

 

I've tried doing it as the data is imported but it gets messey pretty quickly.

 

I've also tried adding a measure using ....

 

IsCR = if(FIND("SBCR",[Activity],1,-1)>0, RIGHT([Activity],LEN([Activity])-FIND("SBCR",[Activity],1,-1)), "")

 

This gets me the first part but I'm struggling to knock off the text string at the end.

 

Unfortunately I can't ask that the data is aperated before I get it.. 

 

Regards,

 

Tony

 

 

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi tonyenglish,

 

You want to extract substring with the beginning of “SBCR” from [Activity], right?

 

Click Query Editor->Transform->Split Column like belew.

1.PNG

Column [Activity.2] is what you want.

2.PNG 

 

Regards,

Jimmy Tao

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi tonyenglish,

 

You want to extract substring with the beginning of “SBCR” from [Activity], right?

 

Click Query Editor->Transform->Split Column like belew.

1.PNG

Column [Activity.2] is what you want.

2.PNG 

 

Regards,

Jimmy Tao

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors
Top Kudoed Authors