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
Anonymous
Not applicable

How to find specific data in conditional column

Heya! Apologies for my lack of terminology I'm new to this app - I am having trouble with getting data from a column, Im trying to just get a specific bit of data from a line entry. So for example, there is a column and each line contains a whole number such as 12345 amongst the words. I want to bring just this data over to its own column - I have tried using conditional column by clicking 'contains' and writign in the information I want to pull, but it pulls in the entire line not just the whole number. Is there a way to tell Power BI to pull JUST the number from the line? Example:

 

1. Invoice 123456 for John Doe

2. Invoice 1234567 for John Doe

3. Invoice 12345678 for John Doe

 

Entering 123456 for exmaple, still seems to pull the entire line in not just the number.

 

Thanks 🙂 

1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

You can use it for a custom column:

Text.Trim(Text.BetweenDelimiters([Column1],"Invoice","for"))

 

Capture.PNG

 

This also works:

Text.Select(Text.Range([Column1], 2, Text.Length([Column1]) - 2), {"0".."9"})

 

It removes the number followed by dot and select only the numbers.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

1 REPLY 1
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

You can use it for a custom column:

Text.Trim(Text.BetweenDelimiters([Column1],"Invoice","for"))

 

Capture.PNG

 

This also works:

Text.Select(Text.Range([Column1], 2, Text.Length([Column1]) - 2), {"0".."9"})

 

It removes the number followed by dot and select only the numbers.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



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
Top Kudoed Authors