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 backspace that corrects it. I think the #(if) may represent Shift+Enter ? The Solution is to use the "Clean" within the transform menu.

 

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

  • 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}))

2 Replies

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

  • 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}))