cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Gladyshev
Frequent Visitor

Search from right to left

Hi all,

 

here is the problem I'm trying to solve:

I have a column with text looks like this 

 

Campaign1_IG_feed_bumper
Campaign2_IG_feed_10sec

Campaign3_PIN_VideoPin_V2_6sec

 

I need to extract the text after lest "_". So, i need to have a columns with

bumper

10sec

6sec

 

I could use Find / Serach function but they both look from left to right and I get as result the position of first "_". Number of "_" could be different as well. So, I need to search from right to left and find a position of the first "_" from the right.

 

Any ideas how I can do that?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: Search from right to left

Hi @Gladyshev 

 

You can do it with Split Column by Delimiter in Power Query as per below.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

3 REPLIES 3
Super User IV
Super User IV

Re: Search from right to left

Hi @Gladyshev 

 

You can do it with Split Column by Delimiter in Power Query as per below.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

Gladyshev
Frequent Visitor

Re: Search from right to left

Thanks a lot! I didn't think about the query. It works!

Super User IV
Super User IV

Re: Search from right to left

In the edit query mode you can use M code

Text.PositionOf(Table[Column], "_", Occurrence.Last)

https://docs.microsoft.com/en-us/powerquery-m/text-positionof





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors