Search code examples
powerquerym

Trimming end of column in Power Query


Hi I'm trying to trim the end of all contents in my column via power query but cant get my syntax correct.

The code I'm using is

= Table.TransformColumns(#"Renamed Columns",Text.Start([Page path level 1],Text.Length([Page path level 1])-1))

The column I'm trying to do this to is called 'Page path level 1' and contents are | /Account/ | /Retrieve/ | /Hello/


Solution

  • Are you trying to remove the last character? Using your functions,

    = Table.TransformColumns(#"Renamed Columns",{{"Page path level 1", each Text.Start(_,Text.Length(_)-1)}})