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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
patri0t82
Post Patron
Post Patron

Search for Word in String, bring back Word +

Hello, I'm trying to look in [Column] for the word "Scenario". If it finds it, I need to return "Scenario " + the next 2 characters. For example, the string may read "2040 3m Scenario 1 **DO NOT CHANGE**" and I need to return "Scenario 1"

2 ACCEPTED SOLUTIONS
patri0t82
Post Patron
Post Patron

Actually, I'll just look for Text.Contains "Scenario 1" or "Scenario 2" etc. That should do what I need, too. Sorry to bother!

View solution in original post

serpiva64
Solution Sage
Solution Sage

Hi,

from this

serpiva64_1-1679322622030.png

to achieve this 

serpiva64_2-1679322649842.png

 

 

 you have to add a custom column

Text.Range([Column1], Text.PositionOf([Column1],"Scenario"),10)

serpiva64_0-1679322572195.png

If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!

View solution in original post

3 REPLIES 3
serpiva64
Solution Sage
Solution Sage

Hi,

from this

serpiva64_1-1679322622030.png

to achieve this 

serpiva64_2-1679322649842.png

 

 

 you have to add a custom column

Text.Range([Column1], Text.PositionOf([Column1],"Scenario"),10)

serpiva64_0-1679322572195.png

If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!

That's perfect! Thanks so much for figuring this out for me!!

patri0t82
Post Patron
Post Patron

Actually, I'll just look for Text.Contains "Scenario 1" or "Scenario 2" etc. That should do what I need, too. Sorry to bother!

Helpful resources

Announcements
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!

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.