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

Extract a specific strong from a column

Hi,

 

this seems like a really straight forward task but I can't find a solution

 

I have a table of expenses, and I need to exclude the expenses that are mileage from my data.

 

Unfortunately the only data I have to go off for this is an inconsistent "description" column, with values that might look like this:

 

DescriptionCost
Drive to meeting - mileage - James54.22
Site visit - 33245 - mileage13.00
Catering - 33245128
Jess - Uber to airport - 4455075
mileage - Harry - 17/1042.10
Equipment hire - 33450 - Suppliers pty ltd - approved by Jess500
33245 - mileage10

 

All I want to do is create a column that extracts each instance of "mileage" from the "description" column, which I will then use to filter out the results I do not want. All of the default extract options are no good as the data is too inconsistent.

1 ACCEPTED SOLUTION
m_alireza
Solution Specialist
Solution Specialist

Hi @Anonymous ,

Is this what you are looking for? 
Screenshot 2022-11-17 130539.png

If so, you can create a conditional column as below: 
Screenshot 2022-11-17 130505.png

View solution in original post

1 REPLY 1
m_alireza
Solution Specialist
Solution Specialist

Hi @Anonymous ,

Is this what you are looking for? 
Screenshot 2022-11-17 130539.png

If so, you can create a conditional column as below: 
Screenshot 2022-11-17 130505.png

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.

Top Solution Authors