Forum Discussion

JChris's avatar
JChris
Helper II
9 years ago
Solved

Remove text in one column based on another column

I have a table like this:   CarName | Year | Maker Civic | Civic 2010 | Honda Civic | Civic 2012 | Honda Civic | Civic 2013 | Honda Focus | Focus 2009 | Ford Focus | Focus 2017 | Ford Santa Fe | Sa...
  • MarcelBeug's avatar
    MarcelBeug
    9 years ago

    This is a nice example for the new Text,BetweenDelimiters function that was introduced with the April 2017 Update of Power BI Desktop.

     

    You can add a column with the following formula:

     

    Text.Trim(Text.BetweenDelimiters([Version]," ",[Software],{1,RelativePosition.FromEnd},{0,RelativePosition.FromEnd}))

     

     

    It will look for the the second space from the end and then - in the preceding part of the string - to the first [Software] string from the end, and returns the part in between.

     

     

    I created a 14 minute video about the new Text.AfterDelimiter, Text,BeforeDelimiter and Text.BetweenDelimiters functions.