Forum Discussion

driley916's avatar
driley916
Regular Visitor
2 years ago
Solved

Headers show hardcode with #(if)

When I expand my data I notice my headers in the formula bar show #(if) before each word. I transposed the headers and some looked stacked. Trim doesnt work but if I go into the header and hit backsp...
  • lbendlin's avatar
    2 years ago

    that's not #(if) but #(lf) for "line feed".  You need to clean your data.

  • AlienSx's avatar
    2 years ago

    you need to get the list of column names, clean it and rename columns of your original table using this new list. 

    names = Table.ColumnNames(your_table),
    clean_names = List.Transform(names, each Text.Replace(Text.Trim(_, "#(lf)"), "#(lf)", " ")),
    renames = Table.RenameColumns(your_table, List.Zip({names, clean_names}))