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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Split text based on character

Hi, I have a text value that I want to be able to split in two different places. The value looks like the following:

 

XXXX_YY1234_V1_AA

 

I am trying to extract just the "YY1234" part. I would do this with just the RIGHT() and LEFT() functions but the number of characters in each section of the value varies. Sometimes the first part is "XXXX" and other times its "XX" for example. So I cant specify a specific character number to start the split on. Can anyone help me with a formula that would specify that I want to split the value to return everything to the right of the first underscore and everything to the left of the second underscore?

 

Thank you for any help!

 

Dan

1 REPLY 1
Tahreem24
Super User
Super User

@Anonymous ,

 

You can get your result using Power Query setting.

Go to Power Query Editor --> Select your column --> right click on it --> select Split by delimiter --> choose custom option and type "_" underscore and hit okay.

Capture.JPG

Don't forget to give thumbs up 👍 and accept this as a solution if it helped you.

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

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.