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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors