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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.