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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Super User
Super User

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
Super User
Super User

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors