cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User I
Super User I

Re: Trim trailing spaces of rows

Hello @aviral 

I've written you a custom function for it to trim header names

(tTable as table) as table =>
let
    Columnheaders = Table.ColumnNames(tTable),
    TrimList = List.Transform(Columnheaders, each Text.Trim(_)),
    RenameHeaders = Table.RenameColumns(tTable, List.Zip({Columnheaders, TrimList}))
in
    RenameHeaders

 

If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun

Jimmy

Highlighted
New Member

Re: Trim trailing spaces of rows

This will be much faster and is cleaner. Thanks. Not sure how to mark it as a solution but I did give you kudos.

 

David

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors